@protolabsai/proto 0.40.0 → 0.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cli.js CHANGED
@@ -137018,7 +137018,7 @@ var require_import_in_the_middle = __commonJS({
137018
137018
  init_esbuild_shims();
137019
137019
  var path151 = __require("path");
137020
137020
  var parse14 = require_module_details_from_path();
137021
- var { fileURLToPath: fileURLToPath20 } = __require("url");
137021
+ var { fileURLToPath: fileURLToPath19 } = __require("url");
137022
137022
  var { MessageChannel: MessageChannel2 } = __require("worker_threads");
137023
137023
  var {
137024
137024
  importHooks,
@@ -137102,7 +137102,7 @@ var require_import_in_the_middle = __commonJS({
137102
137102
  } else {
137103
137103
  if (name4.startsWith("file://")) {
137104
137104
  try {
137105
- name4 = fileURLToPath20(name4);
137105
+ name4 = fileURLToPath19(name4);
137106
137106
  } catch (e4) {
137107
137107
  }
137108
137108
  }
@@ -137117,7 +137117,7 @@ var require_import_in_the_middle = __commonJS({
137117
137117
  if (moduleName2 === name4) {
137118
137118
  if (baseDir) {
137119
137119
  if (internals) {
137120
- name4 = name4 + path151.sep + path151.relative(baseDir, fileURLToPath20(filename));
137120
+ name4 = name4 + path151.sep + path151.relative(baseDir, fileURLToPath19(filename));
137121
137121
  } else {
137122
137122
  if (!getExperimentalPatchInternals() && !baseDir.endsWith(specifiers.get(filename))) continue;
137123
137123
  }
@@ -169159,7 +169159,7 @@ __export(geminiContentGenerator_exports, {
169159
169159
  createGeminiContentGenerator: () => createGeminiContentGenerator
169160
169160
  });
169161
169161
  function createGeminiContentGenerator(config2, gcConfig) {
169162
- const version2 = "0.40.0";
169162
+ const version2 = "0.41.0";
169163
169163
  const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
169164
169164
  const baseHeaders = {
169165
169165
  "User-Agent": userAgent2
@@ -170779,7 +170779,6 @@ This error was probably caused by cyclic schema references in one of the followi
170779
170779
  import path20 from "node:path";
170780
170780
  import fs22 from "node:fs";
170781
170781
  import os6 from "node:os";
170782
- import { fileURLToPath as fileURLToPath2 } from "node:url";
170783
170782
  import { execSync as execSync3 } from "node:child_process";
170784
170783
  import process3 from "node:process";
170785
170784
  function assemblePromptSections(sections) {
@@ -171112,21 +171111,6 @@ Workspace: ${parts2} files
171112
171111
 
171113
171112
  ${getToolCallExamples(model || "")}
171114
171113
 
171115
- ${function() {
171116
- try {
171117
- const skillPath = path20.join(path20.dirname(fileURLToPath2(import.meta.url)), "..", "skills", "bundled", "using-superpowers", "SKILL.md");
171118
- if (fs22.existsSync(skillPath)) {
171119
- const raw2 = fs22.readFileSync(skillPath, "utf-8");
171120
- const body2 = raw2.replace(/^---[\s\S]*?---\s*/m, "").trim();
171121
- return `<EXTREMELY_IMPORTANT>
171122
- ${body2}
171123
- </EXTREMELY_IMPORTANT>`;
171124
- }
171125
- } catch {
171126
- }
171127
- return "";
171128
- }()}
171129
-
171130
171114
  # Final Reminder
171131
171115
  Your core function is efficient and safe assistance. Balance extreme conciseness with the crucial need for clarity, especially regarding safety and potential system modifications. Always prioritize user control and project conventions. Never make assumptions about the contents of files; instead use '${ToolNames.READ_FILE}' to ensure you aren't making broad assumptions. Finally, you are an agent - please keep going until the user's query is completely resolved.
171132
171116
  `.trim();
@@ -185594,9 +185578,9 @@ ${JSON.stringify(symbolNames, null, 2)}`);
185594
185578
  // packages/core/dist/src/utils/shellAstParser.js
185595
185579
  import fs25 from "node:fs";
185596
185580
  import path26 from "node:path";
185597
- import { fileURLToPath as fileURLToPath3 } from "node:url";
185581
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
185598
185582
  function resolveWasmPath(filename) {
185599
- const rawPath = fileURLToPath3(import.meta.url);
185583
+ const rawPath = fileURLToPath2(import.meta.url);
185600
185584
  if (rawPath.includes(path26.join("src", "utils"))) {
185601
185585
  const levelsUp = rawPath.endsWith(".ts") ? 2 : 3;
185602
185586
  return path26.join(path26.dirname(rawPath), ...Array(levelsUp).fill(".."), "vendor", "tree-sitter", filename);
@@ -203088,7 +203072,7 @@ var init_esm9 = __esm({
203088
203072
 
203089
203073
  // node_modules/path-scurry/dist/esm/index.js
203090
203074
  import { posix, win32 } from "node:path";
203091
- import { fileURLToPath as fileURLToPath4 } from "node:url";
203075
+ import { fileURLToPath as fileURLToPath3 } from "node:url";
203092
203076
  import { lstatSync, readdir as readdirCB, readdirSync, readlinkSync, realpathSync as rps } from "fs";
203093
203077
  import * as actualFS from "node:fs";
203094
203078
  import { lstat, readdir as readdir3, readlink, realpath } from "node:fs/promises";
@@ -204235,7 +204219,7 @@ var init_esm10 = __esm({
204235
204219
  constructor(cwd6 = process.cwd(), pathImpl, sep12, { nocase, childrenCacheSize = 16 * 1024, fs: fs140 = defaultFS } = {}) {
204236
204220
  this.#fs = fsFromOption(fs140);
204237
204221
  if (cwd6 instanceof URL || cwd6.startsWith("file://")) {
204238
- cwd6 = fileURLToPath4(cwd6);
204222
+ cwd6 = fileURLToPath3(cwd6);
204239
204223
  }
204240
204224
  const cwdPath = pathImpl.resolve(cwd6);
204241
204225
  this.roots = /* @__PURE__ */ Object.create(null);
@@ -205709,7 +205693,7 @@ var init_walker = __esm({
205709
205693
  });
205710
205694
 
205711
205695
  // node_modules/glob/dist/esm/glob.js
205712
- import { fileURLToPath as fileURLToPath5 } from "node:url";
205696
+ import { fileURLToPath as fileURLToPath4 } from "node:url";
205713
205697
  var defaultPlatform3, Glob;
205714
205698
  var init_glob = __esm({
205715
205699
  "node_modules/glob/dist/esm/glob.js"() {
@@ -205781,7 +205765,7 @@ var init_glob = __esm({
205781
205765
  if (!opts.cwd) {
205782
205766
  this.cwd = "";
205783
205767
  } else if (opts.cwd instanceof URL || opts.cwd.startsWith("file://")) {
205784
- opts.cwd = fileURLToPath5(opts.cwd);
205768
+ opts.cwd = fileURLToPath4(opts.cwd);
205785
205769
  }
205786
205770
  this.cwd = opts.cwd || "";
205787
205771
  this.root = opts.root;
@@ -232880,7 +232864,7 @@ ${directoryContent}`;
232880
232864
 
232881
232865
  // packages/core/dist/src/utils/ripgrepUtils.js
232882
232866
  import path49 from "node:path";
232883
- import { fileURLToPath as fileURLToPath6 } from "node:url";
232867
+ import { fileURLToPath as fileURLToPath5 } from "node:url";
232884
232868
  import { execFile as execFile4 } from "node:child_process";
232885
232869
  function wslTimeout() {
232886
232870
  return process.platform === "linux" && process.env["WSL_INTEROP"] ? RIPGREP_WSL_TIMEOUT_MS : RIPGREP_RUN_TIMEOUT_MS;
@@ -233048,7 +233032,7 @@ var init_ripgrepUtils = __esm({
233048
233032
  cachedHealth = null;
233049
233033
  macSigningAttempted = false;
233050
233034
  __name(wslTimeout, "wslTimeout");
233051
- __filename2 = fileURLToPath6(import.meta.url);
233035
+ __filename2 = fileURLToPath5(import.meta.url);
233052
233036
  __dirname2 = path49.dirname(__filename2);
233053
233037
  __name(getPlatformString, "getPlatformString");
233054
233038
  __name(getArchitectureString, "getArchitectureString");
@@ -244894,7 +244878,7 @@ var init_write_file = __esm({
244894
244878
 
244895
244879
  // packages/core/dist/src/tools/lsp.js
244896
244880
  import path55 from "node:path";
244897
- import { fileURLToPath as fileURLToPath7, pathToFileURL as pathToFileURL2 } from "node:url";
244881
+ import { fileURLToPath as fileURLToPath6, pathToFileURL as pathToFileURL2 } from "node:url";
244898
244882
  var LOCATION_REQUIRED_OPERATIONS, FILE_REQUIRED_OPERATIONS, QUERY_REQUIRED_OPERATIONS, ITEM_REQUIRED_OPERATIONS, RANGE_REQUIRED_OPERATIONS, LspToolInvocation, LspTool;
244899
244883
  var init_lsp = __esm({
244900
244884
  "packages/core/dist/src/tools/lsp.js"() {
@@ -245447,7 +245431,7 @@ ${fileLabel}${serverSuffix}:`);
245447
245431
  const start2 = location.range.start;
245448
245432
  let filePath = location.uri;
245449
245433
  if (filePath.startsWith("file://")) {
245450
- filePath = fileURLToPath7(filePath);
245434
+ filePath = fileURLToPath6(filePath);
245451
245435
  filePath = path55.relative(workspaceRoot, filePath) || ".";
245452
245436
  }
245453
245437
  const serverSuffix = location.serverName && location.serverName !== "" ? ` [${location.serverName}]` : "";
@@ -245457,7 +245441,7 @@ ${fileLabel}${serverSuffix}:`);
245457
245441
  const { uri, range } = location;
245458
245442
  let filePath = uri;
245459
245443
  if (uri.startsWith("file://")) {
245460
- filePath = fileURLToPath7(uri);
245444
+ filePath = fileURLToPath6(uri);
245461
245445
  filePath = path55.relative(workspaceRoot, filePath) || ".";
245462
245446
  }
245463
245447
  const line = (range.start.line ?? 0) + 1;
@@ -245490,7 +245474,7 @@ ${fileLabel}${serverSuffix}:`);
245490
245474
  formatUriForDisplay(uri, workspaceRoot) {
245491
245475
  let filePath = uri;
245492
245476
  if (uri.startsWith("file://")) {
245493
- filePath = fileURLToPath7(uri);
245477
+ filePath = fileURLToPath6(uri);
245494
245478
  }
245495
245479
  if (path55.isAbsolute(filePath)) {
245496
245480
  return path55.relative(workspaceRoot, filePath) || ".";
@@ -249010,7 +248994,7 @@ import * as fs51 from "fs/promises";
249010
248994
  import * as fsSync from "fs";
249011
248995
  import * as path60 from "path";
249012
248996
  import * as os17 from "os";
249013
- import { fileURLToPath as fileURLToPath8 } from "url";
248997
+ import { fileURLToPath as fileURLToPath7 } from "url";
249014
248998
  function watcherIgnored(filePath, stats) {
249015
248999
  if (stats && !stats.isFile() && !stats.isDirectory())
249016
249000
  return true;
@@ -249048,7 +249032,7 @@ var init_skill_manager = __esm({
249048
249032
  bundledSkillsDir;
249049
249033
  constructor(config2) {
249050
249034
  this.config = config2;
249051
- this.bundledSkillsDir = path60.join(path60.dirname(fileURLToPath8(import.meta.url)), "bundled");
249035
+ this.bundledSkillsDir = path60.join(path60.dirname(fileURLToPath7(import.meta.url)), "bundled");
249052
249036
  }
249053
249037
  /**
249054
249038
  * Adds a listener that will be called when skills change.
@@ -280795,7 +280779,7 @@ var init_NativeLspClient = __esm({
280795
280779
 
280796
280780
  // packages/core/dist/src/lsp/NativeLspService.js
280797
280781
  import * as path91 from "path";
280798
- import { fileURLToPath as fileURLToPath9, pathToFileURL as pathToFileURL5 } from "url";
280782
+ import { fileURLToPath as fileURLToPath8, pathToFileURL as pathToFileURL5 } from "url";
280799
280783
  import * as fs84 from "node:fs";
280800
280784
  var debugLogger91, LANGUAGE_ID_TO_EXTENSIONS, DEFAULT_EXCLUDE_PATTERNS, NativeLspService;
280801
280785
  var init_NativeLspService = __esm({
@@ -280924,7 +280908,7 @@ var init_NativeLspService = __esm({
280924
280908
  }
280925
280909
  let filePath;
280926
280910
  try {
280927
- filePath = fileURLToPath9(uri);
280911
+ filePath = fileURLToPath8(uri);
280928
280912
  } catch (error40) {
280929
280913
  debugLogger91.warn(`Failed to resolve file path for ${uri}:`, error40);
280930
280914
  return false;
@@ -281565,7 +281549,7 @@ var init_NativeLspService = __esm({
281565
281549
  * Apply text edits to a file
281566
281550
  */
281567
281551
  async applyTextEdits(uri, edits) {
281568
- let filePath = uri.startsWith("file://") ? fileURLToPath9(uri) : uri;
281552
+ let filePath = uri.startsWith("file://") ? fileURLToPath8(uri) : uri;
281569
281553
  if (!path91.isAbsolute(filePath)) {
281570
281554
  filePath = path91.resolve(this.workspaceRoot, filePath);
281571
281555
  }
@@ -313371,7 +313355,7 @@ var require_backend = __commonJS({
313371
313355
  });
313372
313356
  return a2._currentValue;
313373
313357
  }, "useContext"),
313374
- useEffect: /* @__PURE__ */ __name(function useEffect77(a2) {
313358
+ useEffect: /* @__PURE__ */ __name(function useEffect78(a2) {
313375
313359
  C3();
313376
313360
  x3.push({
313377
313361
  primitive: "Effect",
@@ -313448,7 +313432,7 @@ var require_backend = __commonJS({
313448
313432
  });
313449
313433
  return a2;
313450
313434
  }, "useRef"),
313451
- useState: /* @__PURE__ */ __name(function useState100(a2) {
313435
+ useState: /* @__PURE__ */ __name(function useState101(a2) {
313452
313436
  var b2 = C3();
313453
313437
  a2 = null !== b2 ? b2.memoizedState : "function" === typeof a2 ? a2() : a2;
313454
313438
  x3.push({
@@ -405795,7 +405779,7 @@ var measureElement = /* @__PURE__ */ __name((node) => ({
405795
405779
  var measure_element_default = measureElement;
405796
405780
 
405797
405781
  // packages/cli/src/gemini.tsx
405798
- var import_react182 = __toESM(require_react(), 1);
405782
+ var import_react183 = __toESM(require_react(), 1);
405799
405783
  import dns2 from "node:dns";
405800
405784
  import os50 from "node:os";
405801
405785
  import { basename as basename32 } from "node:path";
@@ -408538,7 +408522,7 @@ import * as fs97 from "node:fs";
408538
408522
  init_esbuild_shims();
408539
408523
  import * as fs95 from "node:fs";
408540
408524
  import * as path104 from "node:path";
408541
- import { fileURLToPath as fileURLToPath10, pathToFileURL as pathToFileURL6 } from "node:url";
408525
+ import { fileURLToPath as fileURLToPath9, pathToFileURL as pathToFileURL6 } from "node:url";
408542
408526
  import { homedir as homedir11 } from "node:os";
408543
408527
 
408544
408528
  // import("./locales/**/*.js") in packages/cli/src/i18n/index.ts
@@ -408558,7 +408542,7 @@ var translations = {};
408558
408542
  var translationCache = {};
408559
408543
  var loadingPromises = {};
408560
408544
  var getBuiltinLocalesDir = /* @__PURE__ */ __name(() => {
408561
- const __filename5 = fileURLToPath10(import.meta.url);
408545
+ const __filename5 = fileURLToPath9(import.meta.url);
408562
408546
  return path104.join(path104.dirname(__filename5), "locales");
408563
408547
  }, "getBuiltinLocalesDir");
408564
408548
  var getUserLocalesDir = /* @__PURE__ */ __name(() => path104.join(homedir11(), ".qwen", "locales"), "getUserLocalesDir");
@@ -411503,7 +411487,7 @@ __name(sync_default, "default");
411503
411487
  // node_modules/yargs/lib/platform-shims/esm.mjs
411504
411488
  import { inspect as inspect2 } from "util";
411505
411489
  import { readFileSync as readFileSync27 } from "fs";
411506
- import { fileURLToPath as fileURLToPath11 } from "url";
411490
+ import { fileURLToPath as fileURLToPath10 } from "url";
411507
411491
 
411508
411492
  // node_modules/yargs-parser/build/lib/index.js
411509
411493
  init_esbuild_shims();
@@ -412780,7 +412764,7 @@ var REQUIRE_ERROR = "require is not supported by ESM";
412780
412764
  var REQUIRE_DIRECTORY_ERROR = "loading a directory of commands is not supported yet for ESM";
412781
412765
  var __dirname3;
412782
412766
  try {
412783
- __dirname3 = fileURLToPath11(import.meta.url);
412767
+ __dirname3 = fileURLToPath10(import.meta.url);
412784
412768
  } catch (e4) {
412785
412769
  __dirname3 = process.cwd();
412786
412770
  }
@@ -416355,8 +416339,8 @@ var linkCommand = {
416355
416339
  init_esbuild_shims();
416356
416340
  import { access as access10, cp as cp2, mkdir as mkdir18, readdir as readdir13, writeFile as writeFile16 } from "node:fs/promises";
416357
416341
  import { join as join50, dirname as dirname34, basename as basename24 } from "node:path";
416358
- import { fileURLToPath as fileURLToPath12 } from "node:url";
416359
- var __filename3 = fileURLToPath12(import.meta.url);
416342
+ import { fileURLToPath as fileURLToPath11 } from "node:url";
416343
+ var __filename3 = fileURLToPath11(import.meta.url);
416360
416344
  var __dirname4 = dirname34(__filename3);
416361
416345
  var EXAMPLES_PATH = join50(__dirname4, "examples");
416362
416346
  async function pathExists(path151) {
@@ -417929,9 +417913,9 @@ import path110 from "node:path";
417929
417913
  init_esbuild_shims();
417930
417914
  import process20 from "node:process";
417931
417915
  import fsPromises3 from "node:fs/promises";
417932
- import { fileURLToPath as fileURLToPath13 } from "node:url";
417916
+ import { fileURLToPath as fileURLToPath12 } from "node:url";
417933
417917
  import path108 from "node:path";
417934
- var toPath = /* @__PURE__ */ __name((urlOrPath) => urlOrPath instanceof URL ? fileURLToPath13(urlOrPath) : urlOrPath, "toPath");
417918
+ var toPath = /* @__PURE__ */ __name((urlOrPath) => urlOrPath instanceof URL ? fileURLToPath12(urlOrPath) : urlOrPath, "toPath");
417935
417919
  async function findUp(name4, {
417936
417920
  cwd: cwd6 = process20.cwd(),
417937
417921
  type = "file",
@@ -418093,9 +418077,9 @@ var import_normalize_package_data = __toESM(require_normalize2(), 1);
418093
418077
 
418094
418078
  // node_modules/unicorn-magic/node.js
418095
418079
  init_esbuild_shims();
418096
- import { fileURLToPath as fileURLToPath14 } from "node:url";
418080
+ import { fileURLToPath as fileURLToPath13 } from "node:url";
418097
418081
  function toPath2(urlOrPath) {
418098
- return urlOrPath instanceof URL ? fileURLToPath14(urlOrPath) : urlOrPath;
418082
+ return urlOrPath instanceof URL ? fileURLToPath13(urlOrPath) : urlOrPath;
418099
418083
  }
418100
418084
  __name(toPath2, "toPath");
418101
418085
 
@@ -418128,9 +418112,9 @@ async function readPackageUp(options2) {
418128
418112
  __name(readPackageUp, "readPackageUp");
418129
418113
 
418130
418114
  // packages/cli/src/utils/package.ts
418131
- import { fileURLToPath as fileURLToPath15 } from "node:url";
418115
+ import { fileURLToPath as fileURLToPath14 } from "node:url";
418132
418116
  import path111 from "node:path";
418133
- var __filename4 = fileURLToPath15(import.meta.url);
418117
+ var __filename4 = fileURLToPath14(import.meta.url);
418134
418118
  var __dirname5 = path111.dirname(__filename4);
418135
418119
  var packageJson;
418136
418120
  async function getPackageJson() {
@@ -418149,7 +418133,7 @@ __name(getPackageJson, "getPackageJson");
418149
418133
  // packages/cli/src/utils/version.ts
418150
418134
  async function getCliVersion() {
418151
418135
  const pkgJson = await getPackageJson();
418152
- return "0.40.0";
418136
+ return "0.41.0";
418153
418137
  }
418154
418138
  __name(getCliVersion, "getCliVersion");
418155
418139
 
@@ -426157,7 +426141,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
426157
426141
 
426158
426142
  // packages/cli/src/generated/git-commit.ts
426159
426143
  init_esbuild_shims();
426160
- var GIT_COMMIT_INFO = "23880d90c";
426144
+ var GIT_COMMIT_INFO = "bb10f1c94";
426161
426145
 
426162
426146
  // packages/cli/src/utils/systemInfo.ts
426163
426147
  async function getNpmVersion() {
@@ -427002,7 +426986,7 @@ init_esbuild_shims();
427002
426986
  import process29 from "node:process";
427003
426987
  import { Buffer as Buffer5 } from "node:buffer";
427004
426988
  import path114 from "node:path";
427005
- import { fileURLToPath as fileURLToPath16 } from "node:url";
426989
+ import { fileURLToPath as fileURLToPath15 } from "node:url";
427006
426990
  import { promisify as promisify8 } from "node:util";
427007
426991
  import childProcess from "node:child_process";
427008
426992
  import fs107, { constants as fsConstants3 } from "node:fs/promises";
@@ -427262,7 +427246,7 @@ __name(defaultBrowser2, "defaultBrowser");
427262
427246
 
427263
427247
  // node_modules/open/index.js
427264
427248
  var execFile12 = promisify8(childProcess.execFile);
427265
- var __dirname6 = path114.dirname(fileURLToPath16(import.meta.url));
427249
+ var __dirname6 = path114.dirname(fileURLToPath15(import.meta.url));
427266
427250
  var localXdgOpenPath = path114.join(__dirname6, "xdg-open");
427267
427251
  var { platform: platform11, arch: arch2 } = process29;
427268
427252
  async function getWindowsDefaultBrowserFromWsl() {
@@ -441012,7 +440996,7 @@ __name(runNonInteractiveStreamJson, "runNonInteractiveStreamJson");
441012
440996
 
441013
440997
  // packages/cli/src/ui/AppContainer.tsx
441014
440998
  init_esbuild_shims();
441015
- var import_react179 = __toESM(require_react(), 1);
440999
+ var import_react180 = __toESM(require_react(), 1);
441016
441000
 
441017
441001
  // packages/cli/src/ui/App.tsx
441018
441002
  init_esbuild_shims();
@@ -476449,7 +476433,7 @@ var DialogManager = /* @__PURE__ */ __name(({
476449
476433
 
476450
476434
  // packages/cli/src/ui/components/Composer.tsx
476451
476435
  init_esbuild_shims();
476452
- var import_react126 = __toESM(require_react(), 1);
476436
+ var import_react127 = __toESM(require_react(), 1);
476453
476437
 
476454
476438
  // packages/cli/src/ui/components/LoadingIndicator.tsx
476455
476439
  init_esbuild_shims();
@@ -479532,8 +479516,64 @@ var VoiceMicButton = /* @__PURE__ */ __name(() => {
479532
479516
  return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Text3, { color: theme.text.secondary, children: "\u{1F3A4} ctrl+space" }) });
479533
479517
  }, "VoiceMicButton");
479534
479518
 
479535
- // packages/cli/src/ui/components/Footer.tsx
479519
+ // packages/cli/src/ui/components/GoalPill.tsx
479520
+ init_esbuild_shims();
479536
479521
  var import_jsx_runtime128 = __toESM(require_jsx_runtime(), 1);
479522
+ var MAX_CONDITION_DISPLAY = 30;
479523
+ var GoalPill = /* @__PURE__ */ __name(({
479524
+ snapshot
479525
+ }) => {
479526
+ const label = truncate9(snapshot.condition, MAX_CONDITION_DISPLAY);
479527
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(Text3, { color: theme.status.warning, children: [
479528
+ "\u25CE ",
479529
+ label,
479530
+ " \xB7 T",
479531
+ snapshot.turnCount
479532
+ ] });
479533
+ }, "GoalPill");
479534
+ function truncate9(s5, max) {
479535
+ if (s5.length <= max) return s5;
479536
+ if (max <= 1) return "\u2026".slice(0, max);
479537
+ return `${s5.slice(0, max - 1)}\u2026`;
479538
+ }
479539
+ __name(truncate9, "truncate");
479540
+
479541
+ // packages/cli/src/ui/hooks/useGoalStatus.ts
479542
+ init_esbuild_shims();
479543
+ var import_react125 = __toESM(require_react(), 1);
479544
+ function useGoalStatus(config2) {
479545
+ const [snapshot, setSnapshot] = (0, import_react125.useState)(null);
479546
+ (0, import_react125.useEffect)(() => {
479547
+ if (!config2) return;
479548
+ const manager = config2.getGoalManager?.();
479549
+ if (!manager) return;
479550
+ const tick = /* @__PURE__ */ __name(() => {
479551
+ const active = manager.getActiveGoal();
479552
+ if (!active) {
479553
+ setSnapshot((prev) => prev === null ? prev : null);
479554
+ return;
479555
+ }
479556
+ setSnapshot((prev) => {
479557
+ if (prev !== null && prev.condition === active.condition && prev.turnCount === active.turnCount && prev.startedAt === active.startedAt) {
479558
+ return prev;
479559
+ }
479560
+ return {
479561
+ condition: active.condition,
479562
+ turnCount: active.turnCount,
479563
+ startedAt: active.startedAt
479564
+ };
479565
+ });
479566
+ }, "tick");
479567
+ tick();
479568
+ const id = setInterval(tick, 500);
479569
+ return () => clearInterval(id);
479570
+ }, [config2]);
479571
+ return snapshot;
479572
+ }
479573
+ __name(useGoalStatus, "useGoalStatus");
479574
+
479575
+ // packages/cli/src/ui/components/Footer.tsx
479576
+ var import_jsx_runtime129 = __toESM(require_jsx_runtime(), 1);
479537
479577
  var Footer = /* @__PURE__ */ __name(() => {
479538
479578
  const uiState = useUIState();
479539
479579
  const config2 = useConfig();
@@ -479548,18 +479588,19 @@ var Footer = /* @__PURE__ */ __name(() => {
479548
479588
  const sandboxInfo = sandboxEnv ? sandboxEnv === "sandbox-exec" ? "seatbelt" : sandboxEnv.startsWith("qwen-code") ? "docker" : sandboxEnv : null;
479549
479589
  const debugMode = config2.getDebugMode();
479550
479590
  const contextWindowSize = config2.getContentGeneratorConfig()?.contextWindowSize;
479551
- const leftContent = uiState.voiceState === "recording" ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Text3, { color: theme.status.error, children: "\u25CF Recording\u2026 (ctrl+space to stop)" }) : uiState.voiceState === "transcribing" ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Text3, { dimColor: true, children: "\u25CC Transcribing\u2026" }) : uiState.ctrlCPressedOnce ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Text3, { color: theme.status.warning, children: t4("Press Ctrl+C again to exit.") }) : uiState.ctrlDPressedOnce ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Text3, { color: theme.status.warning, children: t4("Press Ctrl+D again to exit.") }) : uiState.showEscapePrompt ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Text3, { color: theme.text.secondary, children: t4("Press Esc again to clear.") }) : vimEnabled && vimMode === "INSERT" ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Text3, { color: theme.text.secondary, children: "-- INSERT --" }) : uiState.shellModeActive ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(ShellModeIndicator, {}) : showAutoAcceptIndicator !== void 0 && showAutoAcceptIndicator !== ApprovalMode.DEFAULT ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(AutoAcceptIndicator, { approvalMode: showAutoAcceptIndicator }) : /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(Text3, { color: theme.text.secondary, children: [
479591
+ const goalStatus = useGoalStatus(config2);
479592
+ const leftContent = uiState.voiceState === "recording" ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Text3, { color: theme.status.error, children: "\u25CF Recording\u2026 (ctrl+space to stop)" }) : uiState.voiceState === "transcribing" ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Text3, { dimColor: true, children: "\u25CC Transcribing\u2026" }) : uiState.ctrlCPressedOnce ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Text3, { color: theme.status.warning, children: t4("Press Ctrl+C again to exit.") }) : uiState.ctrlDPressedOnce ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Text3, { color: theme.status.warning, children: t4("Press Ctrl+D again to exit.") }) : uiState.showEscapePrompt ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Text3, { color: theme.text.secondary, children: t4("Press Esc again to clear.") }) : vimEnabled && vimMode === "INSERT" ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Text3, { color: theme.text.secondary, children: "-- INSERT --" }) : uiState.shellModeActive ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(ShellModeIndicator, {}) : showAutoAcceptIndicator !== void 0 && showAutoAcceptIndicator !== ApprovalMode.DEFAULT ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(AutoAcceptIndicator, { approvalMode: showAutoAcceptIndicator }) : /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(Text3, { color: theme.text.secondary, children: [
479552
479593
  t4("? for shortcuts"),
479553
479594
  " \xB7 ",
479554
479595
  t4("Esc\xD72: rewind")
479555
479596
  ] });
479556
479597
  const rightItems = [
479557
- { key: "voice", node: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(VoiceMicButton, {}) }
479598
+ { key: "voice", node: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(VoiceMicButton, {}) }
479558
479599
  ];
479559
479600
  if (sandboxInfo) {
479560
479601
  rightItems.push({
479561
479602
  key: "sandbox",
479562
- node: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(Text3, { color: theme.status.success, children: [
479603
+ node: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(Text3, { color: theme.status.success, children: [
479563
479604
  "\u{1F512} ",
479564
479605
  sandboxInfo
479565
479606
  ] })
@@ -479568,13 +479609,13 @@ var Footer = /* @__PURE__ */ __name(() => {
479568
479609
  if (debugMode) {
479569
479610
  rightItems.push({
479570
479611
  key: "debug",
479571
- node: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Text3, { color: theme.status.warning, children: "Debug Mode" })
479612
+ node: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Text3, { color: theme.status.warning, children: "Debug Mode" })
479572
479613
  });
479573
479614
  }
479574
479615
  if (promptTokenCount > 0 && contextWindowSize) {
479575
479616
  rightItems.push({
479576
479617
  key: "context",
479577
- node: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Text3, { color: theme.text.accent, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
479618
+ node: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Text3, { color: theme.text.accent, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
479578
479619
  ContextUsageDisplay,
479579
479620
  {
479580
479621
  promptTokenCount,
@@ -479584,7 +479625,13 @@ var Footer = /* @__PURE__ */ __name(() => {
479584
479625
  ) })
479585
479626
  });
479586
479627
  }
479587
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
479628
+ if (goalStatus) {
479629
+ rightItems.push({
479630
+ key: "goal",
479631
+ node: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(GoalPill, { snapshot: goalStatus })
479632
+ });
479633
+ }
479634
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
479588
479635
  Box_default,
479589
479636
  {
479590
479637
  justifyContent: "space-between",
@@ -479592,7 +479639,7 @@ var Footer = /* @__PURE__ */ __name(() => {
479592
479639
  flexDirection: "row",
479593
479640
  alignItems: "center",
479594
479641
  children: [
479595
- /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
479642
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
479596
479643
  Box_default,
479597
479644
  {
479598
479645
  marginLeft: 2,
@@ -479601,12 +479648,12 @@ var Footer = /* @__PURE__ */ __name(() => {
479601
479648
  alignItems: isNarrow ? "flex-start" : "center",
479602
479649
  children: [
479603
479650
  leftContent,
479604
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(MCPHealthPill, {})
479651
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(MCPHealthPill, {})
479605
479652
  ]
479606
479653
  }
479607
479654
  ),
479608
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Box_default, { alignItems: "center", justifyContent: "flex-end", marginRight: 2, children: rightItems.map(({ key, node }, index) => /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(Box_default, { alignItems: "center", children: [
479609
- index > 0 && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Text3, { color: theme.text.secondary, children: " | " }),
479655
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Box_default, { alignItems: "center", justifyContent: "flex-end", marginRight: 2, children: rightItems.map(({ key, node }, index) => /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(Box_default, { alignItems: "center", children: [
479656
+ index > 0 && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Text3, { color: theme.text.secondary, children: " | " }),
479610
479657
  node
479611
479658
  ] }, key)) })
479612
479659
  ]
@@ -479616,7 +479663,7 @@ var Footer = /* @__PURE__ */ __name(() => {
479616
479663
 
479617
479664
  // packages/cli/src/ui/components/QueuedMessageDisplay.tsx
479618
479665
  init_esbuild_shims();
479619
- var import_jsx_runtime129 = __toESM(require_jsx_runtime(), 1);
479666
+ var import_jsx_runtime130 = __toESM(require_jsx_runtime(), 1);
479620
479667
  var MAX_DISPLAYED_QUEUED_MESSAGES = 3;
479621
479668
  var QueuedMessageDisplay = /* @__PURE__ */ __name(({
479622
479669
  messageQueue
@@ -479626,20 +479673,20 @@ var QueuedMessageDisplay = /* @__PURE__ */ __name(({
479626
479673
  }
479627
479674
  const count = messageQueue.length;
479628
479675
  const label = count === 1 ? "1 message queued" : `${count} messages queued`;
479629
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
479630
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(Box_default, { paddingLeft: 2, children: [
479631
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Text3, { color: "yellow", bold: true, children: label }),
479632
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Text3, { dimColor: true, children: " \u2014 will be seen at next tool call" })
479676
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
479677
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(Box_default, { paddingLeft: 2, children: [
479678
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Text3, { color: "yellow", bold: true, children: label }),
479679
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Text3, { dimColor: true, children: " \u2014 will be seen at next tool call" })
479633
479680
  ] }),
479634
479681
  messageQueue.slice(0, MAX_DISPLAYED_QUEUED_MESSAGES).map((message, index) => {
479635
479682
  const preview = message.replace(/\s+/g, " ");
479636
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Box_default, { paddingLeft: 4, width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(Text3, { dimColor: true, wrap: "truncate", children: [
479683
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Box_default, { paddingLeft: 4, width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(Text3, { dimColor: true, wrap: "truncate", children: [
479637
479684
  index + 1,
479638
479685
  ". ",
479639
479686
  preview
479640
479687
  ] }) }, index);
479641
479688
  }),
479642
- count > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Box_default, { paddingLeft: 4, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(Text3, { dimColor: true, children: [
479689
+ count > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Box_default, { paddingLeft: 4, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(Text3, { dimColor: true, children: [
479643
479690
  "... (+",
479644
479691
  count - MAX_DISPLAYED_QUEUED_MESSAGES,
479645
479692
  " more)"
@@ -479649,7 +479696,7 @@ var QueuedMessageDisplay = /* @__PURE__ */ __name(({
479649
479696
 
479650
479697
  // packages/cli/src/ui/components/KeyboardShortcuts.tsx
479651
479698
  init_esbuild_shims();
479652
- var import_jsx_runtime130 = __toESM(require_jsx_runtime(), 1);
479699
+ var import_jsx_runtime131 = __toESM(require_jsx_runtime(), 1);
479653
479700
  var getNewlineKey = /* @__PURE__ */ __name(() => process.platform === "win32" ? "ctrl+enter" : "ctrl+j", "getNewlineKey");
479654
479701
  var getPasteKey = /* @__PURE__ */ __name(() => {
479655
479702
  if (process.platform === "win32") return "alt+v";
@@ -479673,8 +479720,8 @@ var getShortcuts = /* @__PURE__ */ __name(() => [
479673
479720
  { key: getPasteKey(), description: t4("to paste images") },
479674
479721
  { key: getExternalEditorKey(), description: t4("for external editor") }
479675
479722
  ], "getShortcuts");
479676
- var ShortcutItem = /* @__PURE__ */ __name(({ shortcut }) => /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(Text3, { color: theme.text.secondary, children: [
479677
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Text3, { color: theme.text.accent, children: shortcut.key }),
479723
+ var ShortcutItem = /* @__PURE__ */ __name(({ shortcut }) => /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(Text3, { color: theme.text.secondary, children: [
479724
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Text3, { color: theme.text.accent, children: shortcut.key }),
479678
479725
  " ",
479679
479726
  shortcut.description
479680
479727
  ] }), "ShortcutItem");
@@ -479715,18 +479762,18 @@ var KeyboardShortcuts = /* @__PURE__ */ __name(() => {
479715
479762
  columns.push(shortcuts.slice(startIndex, startIndex + count));
479716
479763
  startIndex += count;
479717
479764
  }
479718
- return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
479765
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
479719
479766
  Box_default,
479720
479767
  {
479721
479768
  flexDirection: "row",
479722
479769
  marginLeft: MARGIN_LEFT,
479723
479770
  marginRight: MARGIN_RIGHT,
479724
- children: columns.map((column, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
479771
+ children: columns.map((column, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
479725
479772
  Box_default,
479726
479773
  {
479727
479774
  flexDirection: "column",
479728
479775
  marginRight: colIndex < numColumns - 1 ? COLUMN_GAP : 0,
479729
- children: column.map((shortcut) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ShortcutItem, { shortcut }, shortcut.key))
479776
+ children: column.map((shortcut) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ShortcutItem, { shortcut }, shortcut.key))
479730
479777
  },
479731
479778
  colIndex
479732
479779
  ))
@@ -479736,13 +479783,13 @@ var KeyboardShortcuts = /* @__PURE__ */ __name(() => {
479736
479783
 
479737
479784
  // packages/cli/src/ui/components/ConfigInitDisplay.tsx
479738
479785
  init_esbuild_shims();
479739
- var import_react125 = __toESM(require_react(), 1);
479786
+ var import_react126 = __toESM(require_react(), 1);
479740
479787
  init_dist4();
479741
- var import_jsx_runtime131 = __toESM(require_jsx_runtime(), 1);
479788
+ var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1);
479742
479789
  var ConfigInitDisplay = /* @__PURE__ */ __name(() => {
479743
479790
  const config2 = useConfig();
479744
- const [message, setMessage] = (0, import_react125.useState)(t4("Initializing..."));
479745
- (0, import_react125.useEffect)(() => {
479791
+ const [message, setMessage] = (0, import_react126.useState)(t4("Initializing..."));
479792
+ (0, import_react126.useEffect)(() => {
479746
479793
  const onChange = /* @__PURE__ */ __name((clients) => {
479747
479794
  if (!clients || clients.size === 0) {
479748
479795
  setMessage(t4("Initializing..."));
@@ -479766,15 +479813,15 @@ var ConfigInitDisplay = /* @__PURE__ */ __name(() => {
479766
479813
  appEvents.off("mcp-client-update", onChange);
479767
479814
  };
479768
479815
  }, [config2]);
479769
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(Text3, { children: [
479770
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(GeminiSpinner, {}),
479816
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(Text3, { children: [
479817
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(GeminiSpinner, {}),
479771
479818
  " ",
479772
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Text3, { color: theme.text.primary, children: message })
479819
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Text3, { color: theme.text.primary, children: message })
479773
479820
  ] }) });
479774
479821
  }, "ConfigInitDisplay");
479775
479822
 
479776
479823
  // packages/cli/src/ui/components/Composer.tsx
479777
- var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1);
479824
+ var import_jsx_runtime133 = __toESM(require_jsx_runtime(), 1);
479778
479825
  var Composer = /* @__PURE__ */ __name(() => {
479779
479826
  const config2 = useConfig();
479780
479827
  const isScreenReaderEnabled = use_is_screen_reader_enabled_default();
@@ -479790,20 +479837,20 @@ var Composer = /* @__PURE__ */ __name(() => {
479790
479837
  { prompt: 0, candidates: 0 }
479791
479838
  );
479792
479839
  const taskTokens = tokens.candidates - taskStartTokens;
479793
- const [showShortcuts, setShowShortcuts] = (0, import_react126.useState)(false);
479794
- const handleToggleShortcuts = (0, import_react126.useCallback)(() => {
479840
+ const [showShortcuts, setShowShortcuts] = (0, import_react127.useState)(false);
479841
+ const handleToggleShortcuts = (0, import_react127.useCallback)(() => {
479795
479842
  setShowShortcuts((prev) => !prev);
479796
479843
  }, []);
479797
- const [showSuggestions, setShowSuggestions] = (0, import_react126.useState)(false);
479798
- const handleSuggestionsVisibilityChange = (0, import_react126.useCallback)(
479844
+ const [showSuggestions, setShowSuggestions] = (0, import_react127.useState)(false);
479845
+ const handleSuggestionsVisibilityChange = (0, import_react127.useCallback)(
479799
479846
  (visible) => {
479800
479847
  setShowSuggestions(visible);
479801
479848
  uiActions.onSuggestionsVisibilityChange(visible);
479802
479849
  },
479803
479850
  [uiActions]
479804
479851
  );
479805
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
479806
- !uiState.embeddedShellFocused && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
479852
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
479853
+ !uiState.embeddedShellFocused && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
479807
479854
  LoadingIndicator,
479808
479855
  {
479809
479856
  thought: uiState.streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ || config2.getAccessibility()?.enableLoadingPhrases === false ? void 0 : uiState.thought,
@@ -479812,10 +479859,10 @@ var Composer = /* @__PURE__ */ __name(() => {
479812
479859
  candidatesTokens: taskTokens
479813
479860
  }
479814
479861
  ),
479815
- !uiState.isConfigInitialized && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ConfigInitDisplay, {}),
479816
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(QueuedMessageDisplay, { messageQueue: uiState.messageQueue }),
479817
- uiState.isFeedbackDialogOpen && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(FeedbackDialog, {}),
479818
- uiState.isInputActive && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
479862
+ !uiState.isConfigInitialized && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(ConfigInitDisplay, {}),
479863
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(QueuedMessageDisplay, { messageQueue: uiState.messageQueue }),
479864
+ uiState.isFeedbackDialogOpen && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(FeedbackDialog, {}),
479865
+ uiState.isInputActive && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
479819
479866
  InputPrompt,
479820
479867
  {
479821
479868
  buffer: uiState.buffer,
@@ -479844,49 +479891,49 @@ var Composer = /* @__PURE__ */ __name(() => {
479844
479891
  onPromptSuggestionDismiss: uiState.dismissPromptSuggestion
479845
479892
  }
479846
479893
  ),
479847
- uiState.isInputActive && !showSuggestions && (showShortcuts ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(KeyboardShortcuts, {}) : !isScreenReaderEnabled && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Footer, {}))
479894
+ uiState.isInputActive && !showSuggestions && (showShortcuts ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(KeyboardShortcuts, {}) : !isScreenReaderEnabled && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Footer, {}))
479848
479895
  ] });
479849
479896
  }, "Composer");
479850
479897
 
479851
479898
  // packages/cli/src/ui/components/ExitWarning.tsx
479852
479899
  init_esbuild_shims();
479853
- var import_jsx_runtime133 = __toESM(require_jsx_runtime(), 1);
479900
+ var import_jsx_runtime134 = __toESM(require_jsx_runtime(), 1);
479854
479901
  var ExitWarning = /* @__PURE__ */ __name(() => {
479855
479902
  const uiState = useUIState();
479856
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_jsx_runtime133.Fragment, { children: [
479857
- uiState.dialogsVisible && uiState.ctrlCPressedOnce && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Text3, { color: theme.status.warning, children: "Press Ctrl+C again to exit." }) }),
479858
- uiState.dialogsVisible && uiState.ctrlDPressedOnce && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Text3, { color: theme.status.warning, children: "Press Ctrl+D again to exit." }) })
479903
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_jsx_runtime134.Fragment, { children: [
479904
+ uiState.dialogsVisible && uiState.ctrlCPressedOnce && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Text3, { color: theme.status.warning, children: "Press Ctrl+C again to exit." }) }),
479905
+ uiState.dialogsVisible && uiState.ctrlDPressedOnce && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Text3, { color: theme.status.warning, children: "Press Ctrl+D again to exit." }) })
479859
479906
  ] });
479860
479907
  }, "ExitWarning");
479861
479908
 
479862
479909
  // packages/cli/src/ui/layouts/ScreenReaderAppLayout.tsx
479863
- var import_jsx_runtime134 = __toESM(require_jsx_runtime(), 1);
479910
+ var import_jsx_runtime135 = __toESM(require_jsx_runtime(), 1);
479864
479911
  var ScreenReaderAppLayout = /* @__PURE__ */ __name(() => {
479865
479912
  const uiState = useUIState();
479866
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(Box_default, { flexDirection: "column", width: "90%", height: "100%", children: [
479867
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Notifications, {}),
479868
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Footer, {}),
479869
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Box_default, { flexGrow: 1, overflow: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(MainContent, {}) }),
479870
- uiState.dialogsVisible ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Box_default, { marginX: 2, flexDirection: "column", width: uiState.mainAreaWidth, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
479913
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(Box_default, { flexDirection: "column", width: "90%", height: "100%", children: [
479914
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Notifications, {}),
479915
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Footer, {}),
479916
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Box_default, { flexGrow: 1, overflow: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(MainContent, {}) }),
479917
+ uiState.dialogsVisible ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Box_default, { marginX: 2, flexDirection: "column", width: uiState.mainAreaWidth, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
479871
479918
  DialogManager,
479872
479919
  {
479873
479920
  terminalWidth: uiState.terminalWidth,
479874
479921
  addItem: uiState.historyManager.addItem
479875
479922
  }
479876
- ) }) : uiState.btwItem ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Box_default, { marginX: 2, width: uiState.terminalWidth - 4, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(BtwMessage, { btw: uiState.btwItem.btw }) }) : /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Composer, {}),
479877
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ExitWarning, {})
479923
+ ) }) : uiState.btwItem ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Box_default, { marginX: 2, width: uiState.terminalWidth - 4, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(BtwMessage, { btw: uiState.btwItem.btw }) }) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Composer, {}),
479924
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ExitWarning, {})
479878
479925
  ] });
479879
479926
  }, "ScreenReaderAppLayout");
479880
479927
 
479881
479928
  // packages/cli/src/ui/layouts/DefaultAppLayout.tsx
479882
479929
  init_esbuild_shims();
479883
- var import_react136 = __toESM(require_react(), 1);
479930
+ var import_react137 = __toESM(require_react(), 1);
479884
479931
 
479885
479932
  // packages/cli/src/ui/components/agent-view/AgentTabBar.tsx
479886
479933
  init_esbuild_shims();
479887
- var import_react127 = __toESM(require_react(), 1);
479934
+ var import_react128 = __toESM(require_react(), 1);
479888
479935
  init_dist4();
479889
- var import_jsx_runtime135 = __toESM(require_jsx_runtime(), 1);
479936
+ var import_jsx_runtime136 = __toESM(require_jsx_runtime(), 1);
479890
479937
  function statusIndicator(agent) {
479891
479938
  const status = agent.interactiveAgent.getStatus();
479892
479939
  switch (status) {
@@ -479931,9 +479978,9 @@ var AgentTabBar = /* @__PURE__ */ __name(() => {
479931
479978
  },
479932
479979
  { isActive: true }
479933
479980
  );
479934
- const [, setTick] = (0, import_react127.useState)(0);
479935
- const forceRender = (0, import_react127.useCallback)(() => setTick((t5) => t5 + 1), []);
479936
- (0, import_react127.useEffect)(() => {
479981
+ const [, setTick] = (0, import_react128.useState)(0);
479982
+ const forceRender = (0, import_react128.useCallback)(() => setTick((t5) => t5 + 1), []);
479983
+ (0, import_react128.useEffect)(() => {
479937
479984
  const cleanups = [];
479938
479985
  for (const [, agent] of agents) {
479939
479986
  const emitter = agent.interactiveAgent.getEventEmitter();
@@ -479948,8 +479995,8 @@ var AgentTabBar = /* @__PURE__ */ __name(() => {
479948
479995
  }, [agents, forceRender]);
479949
479996
  const isFocused = agentTabBarFocused;
479950
479997
  const hint = isFocused ? "\u2190/\u2192 switch \u2191 input" : "\u2193 tabs";
479951
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(Box_default, { flexDirection: "row", paddingX: 1, children: [
479952
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Box_default, { marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
479998
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(Box_default, { flexDirection: "row", paddingX: 1, children: [
479999
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Box_default, { marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
479953
480000
  Text3,
479954
480001
  {
479955
480002
  bold: activeView === "main",
@@ -479959,12 +480006,12 @@ var AgentTabBar = /* @__PURE__ */ __name(() => {
479959
480006
  children: " Main "
479960
480007
  }
479961
480008
  ) }),
479962
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Text3, { dimColor: !isFocused, color: theme.border.default, children: "\u2502" }),
480009
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Text3, { dimColor: !isFocused, color: theme.border.default, children: "\u2502" }),
479963
480010
  [...agents.entries()].map(([agentId, agent]) => {
479964
480011
  const isActive = activeView === agentId;
479965
480012
  const { symbol: symbol2, color: indicatorColor } = statusIndicator(agent);
479966
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(Box_default, { marginLeft: 1, children: [
479967
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
480013
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(Box_default, { marginLeft: 1, children: [
480014
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
479968
480015
  Text3,
479969
480016
  {
479970
480017
  bold: isActive,
@@ -479974,16 +480021,16 @@ var AgentTabBar = /* @__PURE__ */ __name(() => {
479974
480021
  children: ` ${agent.modelId} `
479975
480022
  }
479976
480023
  ),
479977
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Text3, { dimColor: !isFocused, color: indicatorColor, children: ` ${symbol2}` })
480024
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Text3, { dimColor: !isFocused, color: indicatorColor, children: ` ${symbol2}` })
479978
480025
  ] }, agentId);
479979
480026
  }),
479980
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Text3, { color: theme.text.secondary, children: hint }) })
480027
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Text3, { color: theme.text.secondary, children: hint }) })
479981
480028
  ] });
479982
480029
  }, "AgentTabBar");
479983
480030
 
479984
480031
  // packages/cli/src/ui/components/agent-view/AgentChatView.tsx
479985
480032
  init_esbuild_shims();
479986
- var import_react128 = __toESM(require_react(), 1);
480033
+ var import_react129 = __toESM(require_react(), 1);
479987
480034
  init_dist4();
479988
480035
 
479989
480036
  // packages/cli/src/ui/components/agent-view/agentHistoryAdapter.ts
@@ -480091,7 +480138,7 @@ __name(agentMessagesToHistoryItems, "agentMessagesToHistoryItems");
480091
480138
  // packages/cli/src/ui/components/agent-view/AgentHeader.tsx
480092
480139
  init_esbuild_shims();
480093
480140
  init_dist4();
480094
- var import_jsx_runtime136 = __toESM(require_jsx_runtime(), 1);
480141
+ var import_jsx_runtime137 = __toESM(require_jsx_runtime(), 1);
480095
480142
  var AgentHeader = /* @__PURE__ */ __name(({
480096
480143
  modelId,
480097
480144
  modelName,
@@ -480102,7 +480149,7 @@ var AgentHeader = /* @__PURE__ */ __name(({
480102
480149
  const maxPathLen = Math.max(20, terminalWidth - 12);
480103
480150
  const displayPath = shortenPath(tildeifyPath(workingDirectory), maxPathLen);
480104
480151
  const modelText = modelName && modelName !== modelId ? `${modelId} (${modelName})` : modelId;
480105
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
480152
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
480106
480153
  Box_default,
480107
480154
  {
480108
480155
  flexDirection: "column",
@@ -480112,17 +480159,17 @@ var AgentHeader = /* @__PURE__ */ __name(({
480112
480159
  borderColor: theme.border.default,
480113
480160
  paddingX: 1,
480114
480161
  children: [
480115
- /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(Text3, { children: [
480116
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Text3, { color: theme.text.secondary, children: "Model: " }),
480117
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Text3, { color: theme.text.primary, children: modelText })
480162
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(Text3, { children: [
480163
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Text3, { color: theme.text.secondary, children: "Model: " }),
480164
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Text3, { color: theme.text.primary, children: modelText })
480118
480165
  ] }),
480119
- /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(Text3, { children: [
480120
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Text3, { color: theme.text.secondary, children: "Path: " }),
480121
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Text3, { color: theme.text.primary, children: displayPath })
480166
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(Text3, { children: [
480167
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Text3, { color: theme.text.secondary, children: "Path: " }),
480168
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Text3, { color: theme.text.primary, children: displayPath })
480122
480169
  ] }),
480123
- gitBranch && /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(Text3, { children: [
480124
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Text3, { color: theme.text.secondary, children: "Branch: " }),
480125
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Text3, { color: theme.text.primary, children: gitBranch })
480170
+ gitBranch && /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(Text3, { children: [
480171
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Text3, { color: theme.text.secondary, children: "Branch: " }),
480172
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Text3, { color: theme.text.primary, children: gitBranch })
480126
480173
  ] })
480127
480174
  ]
480128
480175
  }
@@ -480130,7 +480177,7 @@ var AgentHeader = /* @__PURE__ */ __name(({
480130
480177
  }, "AgentHeader");
480131
480178
 
480132
480179
  // packages/cli/src/ui/components/agent-view/AgentChatView.tsx
480133
- var import_jsx_runtime137 = __toESM(require_jsx_runtime(), 1);
480180
+ var import_jsx_runtime138 = __toESM(require_jsx_runtime(), 1);
480134
480181
  var AgentChatView = /* @__PURE__ */ __name(({ agentId }) => {
480135
480182
  const { agents } = useAgentViewState();
480136
480183
  const { setAgentShellFocused } = useAgentViewActions();
@@ -480139,13 +480186,13 @@ var AgentChatView = /* @__PURE__ */ __name(({ agentId }) => {
480139
480186
  const { columns: terminalWidth } = useTerminalSize();
480140
480187
  const agent = agents.get(agentId);
480141
480188
  const contentWidth = terminalWidth - 4;
480142
- const [, setRenderTick] = (0, import_react128.useState)(0);
480143
- const tickRef = (0, import_react128.useRef)(0);
480144
- const forceRender = (0, import_react128.useCallback)(() => {
480189
+ const [, setRenderTick] = (0, import_react129.useState)(0);
480190
+ const tickRef = (0, import_react129.useRef)(0);
480191
+ const forceRender = (0, import_react129.useCallback)(() => {
480145
480192
  tickRef.current += 1;
480146
480193
  setRenderTick(tickRef.current);
480147
480194
  }, []);
480148
- (0, import_react128.useEffect)(() => {
480195
+ (0, import_react129.useEffect)(() => {
480149
480196
  if (!agent) return;
480150
480197
  const emitter = agent.interactiveAgent.getEventEmitter();
480151
480198
  if (!emitter) return;
@@ -480178,12 +480225,12 @@ var AgentChatView = /* @__PURE__ */ __name(({ agentId }) => {
480178
480225
  const status = interactiveAgent?.getStatus();
480179
480226
  const isRunning = status === AgentStatus.RUNNING || status === AgentStatus.INITIALIZING;
480180
480227
  const activePtyId = shellPids && shellPids.size > 0 ? shellPids.values().next().value : void 0;
480181
- const [embeddedShellFocused, setEmbeddedShellFocusedLocal] = (0, import_react128.useState)(false);
480182
- (0, import_react128.useEffect)(() => {
480228
+ const [embeddedShellFocused, setEmbeddedShellFocusedLocal] = (0, import_react129.useState)(false);
480229
+ (0, import_react129.useEffect)(() => {
480183
480230
  setAgentShellFocused(embeddedShellFocused);
480184
480231
  return () => setAgentShellFocused(false);
480185
480232
  }, [embeddedShellFocused, setAgentShellFocused]);
480186
- (0, import_react128.useEffect)(() => {
480233
+ (0, import_react129.useEffect)(() => {
480187
480234
  if (!activePtyId) setEmbeddedShellFocusedLocal(false);
480188
480235
  }, [activePtyId]);
480189
480236
  useKeypress(
@@ -480196,7 +480243,7 @@ var AgentChatView = /* @__PURE__ */ __name(({ agentId }) => {
480196
480243
  },
480197
480244
  { isActive: true }
480198
480245
  );
480199
- const allItems = (0, import_react128.useMemo)(
480246
+ const allItems = (0, import_react129.useMemo)(
480200
480247
  () => agentMessagesToHistoryItems(
480201
480248
  messages,
480202
480249
  pendingApprovals ?? /* @__PURE__ */ new Map(),
@@ -480213,7 +480260,7 @@ var AgentChatView = /* @__PURE__ */ __name(({ agentId }) => {
480213
480260
  tickRef.current
480214
480261
  ]
480215
480262
  );
480216
- const splitIndex = (0, import_react128.useMemo)(() => {
480263
+ const splitIndex = (0, import_react129.useMemo)(() => {
480217
480264
  for (let idx = allItems.length - 1; idx >= 0; idx--) {
480218
480265
  const item = allItems[idx];
480219
480266
  if (item.type === "tool_group" && item.tools.some(
@@ -480228,14 +480275,14 @@ var AgentChatView = /* @__PURE__ */ __name(({ agentId }) => {
480228
480275
  const pendingItems = allItems.slice(splitIndex);
480229
480276
  const core = interactiveAgent?.getCore();
480230
480277
  const agentWorkingDir = core?.runtimeContext.getTargetDir() ?? "";
480231
- const agentGitBranch = (0, import_react128.useMemo)(
480278
+ const agentGitBranch = (0, import_react129.useMemo)(
480232
480279
  () => agentWorkingDir ? getGitBranch(agentWorkingDir) : "",
480233
480280
  // eslint-disable-next-line react-hooks/exhaustive-deps
480234
480281
  [agentId]
480235
480282
  );
480236
480283
  const agentModelId = core?.modelConfig.model ?? "";
480237
- const staticItems = (0, import_react128.useMemo)(() => [
480238
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
480284
+ const staticItems = (0, import_react129.useMemo)(() => [
480285
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
480239
480286
  AgentHeader,
480240
480287
  {
480241
480288
  modelId: agentModelId,
@@ -480245,7 +480292,7 @@ var AgentChatView = /* @__PURE__ */ __name(({ agentId }) => {
480245
480292
  },
480246
480293
  "agent-header"
480247
480294
  ),
480248
- ...committedItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
480295
+ ...committedItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
480249
480296
  HistoryItemDisplayComponent,
480250
480297
  {
480251
480298
  item,
@@ -480265,15 +480312,15 @@ var AgentChatView = /* @__PURE__ */ __name(({ agentId }) => {
480265
480312
  contentWidth
480266
480313
  ]);
480267
480314
  if (!agent || !interactiveAgent || !core) {
480268
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Box_default, { marginX: 2, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(Text3, { color: theme.status.error, children: [
480315
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Box_default, { marginX: 2, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(Text3, { color: theme.status.error, children: [
480269
480316
  'Agent "',
480270
480317
  agentId,
480271
480318
  '" not found.'
480272
480319
  ] }) });
480273
480320
  }
480274
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(Box_default, { flexDirection: "column", children: [
480275
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Static, { items: staticItems, children: (item) => item }, `agent-${agentId}-${historyRemountKey}`),
480276
- pendingItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
480321
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(Box_default, { flexDirection: "column", children: [
480322
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Static, { items: staticItems, children: (item) => item }, `agent-${agentId}-${historyRemountKey}`),
480323
+ pendingItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
480277
480324
  HistoryItemDisplayComponent,
480278
480325
  {
480279
480326
  item,
@@ -480287,29 +480334,29 @@ var AgentChatView = /* @__PURE__ */ __name(({ agentId }) => {
480287
480334
  },
480288
480335
  item.id
480289
480336
  )),
480290
- isRunning && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Box_default, { marginX: 2, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(GeminiRespondingSpinner, {}) })
480337
+ isRunning && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Box_default, { marginX: 2, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(GeminiRespondingSpinner, {}) })
480291
480338
  ] });
480292
480339
  }, "AgentChatView");
480293
480340
 
480294
480341
  // packages/cli/src/ui/components/agent-view/AgentComposer.tsx
480295
480342
  init_esbuild_shims();
480296
- var import_react131 = __toESM(require_react(), 1);
480343
+ var import_react132 = __toESM(require_react(), 1);
480297
480344
  init_dist4();
480298
480345
 
480299
480346
  // packages/cli/src/ui/hooks/useAgentStreamingState.ts
480300
480347
  init_esbuild_shims();
480301
- var import_react130 = __toESM(require_react(), 1);
480348
+ var import_react131 = __toESM(require_react(), 1);
480302
480349
  init_dist4();
480303
480350
 
480304
480351
  // packages/cli/src/ui/hooks/useTimer.ts
480305
480352
  init_esbuild_shims();
480306
- var import_react129 = __toESM(require_react(), 1);
480353
+ var import_react130 = __toESM(require_react(), 1);
480307
480354
  var useTimer = /* @__PURE__ */ __name((isActive, resetKey) => {
480308
- const [elapsedTime, setElapsedTime] = (0, import_react129.useState)(0);
480309
- const timerRef = (0, import_react129.useRef)(null);
480310
- const prevResetKeyRef = (0, import_react129.useRef)(resetKey);
480311
- const prevIsActiveRef = (0, import_react129.useRef)(isActive);
480312
- (0, import_react129.useEffect)(() => {
480355
+ const [elapsedTime, setElapsedTime] = (0, import_react130.useState)(0);
480356
+ const timerRef = (0, import_react130.useRef)(null);
480357
+ const prevResetKeyRef = (0, import_react130.useRef)(resetKey);
480358
+ const prevIsActiveRef = (0, import_react130.useRef)(isActive);
480359
+ (0, import_react130.useEffect)(() => {
480313
480360
  let shouldResetTime = false;
480314
480361
  if (prevResetKeyRef.current !== resetKey) {
480315
480362
  shouldResetTime = true;
@@ -480347,17 +480394,17 @@ var useTimer = /* @__PURE__ */ __name((isActive, resetKey) => {
480347
480394
 
480348
480395
  // packages/cli/src/ui/hooks/useAgentStreamingState.ts
480349
480396
  function useAgentStreamingState(interactiveAgent, events) {
480350
- const [, setTick] = (0, import_react130.useState)(0);
480351
- const tickRef = (0, import_react130.useRef)(0);
480352
- const forceRender = (0, import_react130.useCallback)(() => {
480397
+ const [, setTick] = (0, import_react131.useState)(0);
480398
+ const tickRef = (0, import_react131.useRef)(0);
480399
+ const forceRender = (0, import_react131.useCallback)(() => {
480353
480400
  tickRef.current += 1;
480354
480401
  setTick(tickRef.current);
480355
480402
  }, []);
480356
- const [lastPromptTokenCount, setLastPromptTokenCount] = (0, import_react130.useState)(
480403
+ const [lastPromptTokenCount, setLastPromptTokenCount] = (0, import_react131.useState)(
480357
480404
  () => interactiveAgent?.getLastPromptTokenCount() ?? 0
480358
480405
  );
480359
480406
  const subscribedEvents = events ?? DEFAULT_EVENTS;
480360
- (0, import_react130.useEffect)(() => {
480407
+ (0, import_react131.useEffect)(() => {
480361
480408
  if (!interactiveAgent) return;
480362
480409
  const emitter = interactiveAgent.getEventEmitter();
480363
480410
  if (!emitter) return;
@@ -480382,7 +480429,7 @@ function useAgentStreamingState(interactiveAgent, events) {
480382
480429
  const status = interactiveAgent?.getStatus();
480383
480430
  const pendingApprovals = interactiveAgent?.getPendingApprovals();
480384
480431
  const hasPendingApprovals = pendingApprovals !== void 0 && pendingApprovals.size > 0;
480385
- const streamingState = (0, import_react130.useMemo)(() => {
480432
+ const streamingState = (0, import_react131.useMemo)(() => {
480386
480433
  if (hasPendingApprovals) {
480387
480434
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
480388
480435
  }
@@ -480392,9 +480439,9 @@ function useAgentStreamingState(interactiveAgent, events) {
480392
480439
  return "idle" /* Idle */;
480393
480440
  }, [status, hasPendingApprovals]);
480394
480441
  const isInputActive = (streamingState === "idle" /* Idle */ || streamingState === "responding" /* Responding */) && status !== void 0 && !isTerminalStatus(status);
480395
- const [timerResetKey, setTimerResetKey] = (0, import_react130.useState)(0);
480396
- const prevStreamingRef = (0, import_react130.useRef)(streamingState);
480397
- (0, import_react130.useEffect)(() => {
480442
+ const [timerResetKey, setTimerResetKey] = (0, import_react131.useState)(0);
480443
+ const prevStreamingRef = (0, import_react131.useRef)(streamingState);
480444
+ (0, import_react131.useEffect)(() => {
480398
480445
  if (streamingState === "responding" /* Responding */ && prevStreamingRef.current !== "responding" /* Responding */) {
480399
480446
  setTimerResetKey((k2) => k2 + 1);
480400
480447
  }
@@ -480422,7 +480469,7 @@ var DEFAULT_EVENTS = [
480422
480469
  // packages/cli/src/ui/components/agent-view/AgentFooter.tsx
480423
480470
  init_esbuild_shims();
480424
480471
  init_dist4();
480425
- var import_jsx_runtime138 = __toESM(require_jsx_runtime(), 1);
480472
+ var import_jsx_runtime139 = __toESM(require_jsx_runtime(), 1);
480426
480473
  var AgentFooter = /* @__PURE__ */ __name(({
480427
480474
  approvalMode,
480428
480475
  promptTokenCount,
@@ -480434,7 +480481,7 @@ var AgentFooter = /* @__PURE__ */ __name(({
480434
480481
  if (!showApproval && !showContext) {
480435
480482
  return null;
480436
480483
  }
480437
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
480484
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
480438
480485
  Box_default,
480439
480486
  {
480440
480487
  justifyContent: "space-between",
@@ -480442,8 +480489,8 @@ var AgentFooter = /* @__PURE__ */ __name(({
480442
480489
  flexDirection: "row",
480443
480490
  alignItems: "center",
480444
480491
  children: [
480445
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Box_default, { marginLeft: 2, children: showApproval ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(AutoAcceptIndicator, { approvalMode }) : null }),
480446
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Box_default, { marginRight: 2, children: showContext && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Text3, { color: theme.text.accent, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
480492
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Box_default, { marginLeft: 2, children: showApproval ? /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(AutoAcceptIndicator, { approvalMode }) : null }),
480493
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Box_default, { marginRight: 2, children: showContext && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Text3, { color: theme.text.accent, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
480447
480494
  ContextUsageDisplay,
480448
480495
  {
480449
480496
  promptTokenCount,
@@ -480457,7 +480504,7 @@ var AgentFooter = /* @__PURE__ */ __name(({
480457
480504
  }, "AgentFooter");
480458
480505
 
480459
480506
  // packages/cli/src/ui/components/agent-view/AgentComposer.tsx
480460
- var import_jsx_runtime139 = __toESM(require_jsx_runtime(), 1);
480507
+ var import_jsx_runtime140 = __toESM(require_jsx_runtime(), 1);
480461
480508
  var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
480462
480509
  const { agents, agentTabBarFocused, agentShellFocused, agentApprovalModes } = useAgentViewState();
480463
480510
  const {
@@ -480501,7 +480548,7 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
480501
480548
  },
480502
480549
  { isActive: !agentShellFocused }
480503
480550
  );
480504
- const isValidPath = (0, import_react131.useCallback)(() => false, []);
480551
+ const isValidPath = (0, import_react132.useCallback)(() => false, []);
480505
480552
  const buffer = useTextBuffer({
480506
480553
  initialText: "",
480507
480554
  viewport: { height: 3, width: inputWidth },
@@ -480509,16 +480556,16 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
480509
480556
  setRawMode,
480510
480557
  isValidPath
480511
480558
  });
480512
- (0, import_react131.useEffect)(() => {
480559
+ (0, import_react132.useEffect)(() => {
480513
480560
  setAgentInputBufferText(buffer.text);
480514
480561
  return () => setAgentInputBufferText("");
480515
480562
  }, [buffer.text, setAgentInputBufferText]);
480516
- (0, import_react131.useEffect)(() => {
480563
+ (0, import_react132.useEffect)(() => {
480517
480564
  if (!isInputActive) {
480518
480565
  setAgentTabBarFocused(true);
480519
480566
  }
480520
480567
  }, [isInputActive, streamingState, setAgentTabBarFocused]);
480521
- const handleKeypress = (0, import_react131.useCallback)(
480568
+ const handleKeypress = (0, import_react132.useCallback)(
480522
480569
  (key) => {
480523
480570
  if (agentTabBarFocused) {
480524
480571
  if (key.sequence && key.sequence.length === 1 && !key.ctrl && !key.meta) {
@@ -480536,15 +480583,15 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
480536
480583
  },
480537
480584
  [buffer, agentTabBarFocused, setAgentTabBarFocused]
480538
480585
  );
480539
- const [messageQueue, setMessageQueue] = (0, import_react131.useState)([]);
480540
- (0, import_react131.useEffect)(() => {
480586
+ const [messageQueue, setMessageQueue] = (0, import_react132.useState)([]);
480587
+ (0, import_react132.useEffect)(() => {
480541
480588
  if (streamingState === "idle" /* Idle */ && messageQueue.length > 0 && status !== void 0 && !isTerminalStatus(status)) {
480542
480589
  const combined = messageQueue.join("\n");
480543
480590
  setMessageQueue([]);
480544
480591
  interactiveAgent?.enqueueMessage(combined);
480545
480592
  }
480546
480593
  }, [streamingState, messageQueue, interactiveAgent, status]);
480547
- const handleSubmit = (0, import_react131.useCallback)(
480594
+ const handleSubmit = (0, import_react132.useCallback)(
480548
480595
  (text) => {
480549
480596
  const trimmed2 = text.trim();
480550
480597
  if (!trimmed2 || !interactiveAgent) return;
@@ -480556,7 +480603,7 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
480556
480603
  },
480557
480604
  [interactiveAgent, streamingState]
480558
480605
  );
480559
- const statusLabel = (0, import_react131.useMemo)(() => {
480606
+ const statusLabel = (0, import_react132.useMemo)(() => {
480560
480607
  switch (status) {
480561
480608
  case AgentStatus.COMPLETED:
480562
480609
  return { text: t4("Completed"), color: theme.status.success };
@@ -480577,21 +480624,21 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
480577
480624
  const isAutoAccept = agentApprovalMode !== ApprovalMode.DEFAULT;
480578
480625
  const statusColor = isYolo ? theme.status.errorDim : isAutoAccept ? theme.status.warningDim : void 0;
480579
480626
  const inputBorderColor = !isInputActive || agentTabBarFocused ? theme.border.default : statusColor ?? theme.border.focused;
480580
- const prefixNode = /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(Text3, { color: statusColor ?? theme.text.accent, children: [
480627
+ const prefixNode = /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(Text3, { color: statusColor ?? theme.text.accent, children: [
480581
480628
  isYolo ? "*" : ">",
480582
480629
  " "
480583
480630
  ] });
480584
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(StreamingContext.Provider, { value: streamingState, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
480585
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
480631
+ return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(StreamingContext.Provider, { value: streamingState, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
480632
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
480586
480633
  LoadingIndicator,
480587
480634
  {
480588
480635
  currentLoadingPhrase: streamingState === "responding" /* Responding */ ? t4("Thinking\u2026") : void 0,
480589
480636
  elapsedTime
480590
480637
  }
480591
480638
  ),
480592
- statusLabel && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Text3, { color: statusLabel.color, children: statusLabel.text }) }),
480593
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(QueuedMessageDisplay, { messageQueue }),
480594
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
480639
+ statusLabel && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Text3, { color: statusLabel.color, children: statusLabel.text }) }),
480640
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(QueuedMessageDisplay, { messageQueue }),
480641
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
480595
480642
  BaseTextInput,
480596
480643
  {
480597
480644
  buffer,
@@ -480604,7 +480651,7 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
480604
480651
  isActive: isInputActive && !agentShellFocused
480605
480652
  }
480606
480653
  ),
480607
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
480654
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
480608
480655
  AgentFooter,
480609
480656
  {
480610
480657
  approvalMode: agentApprovalMode,
@@ -480618,20 +480665,20 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
480618
480665
 
480619
480666
  // packages/cli/src/ui/components/StatusBar.tsx
480620
480667
  init_esbuild_shims();
480621
- var import_react135 = __toESM(require_react(), 1);
480668
+ var import_react136 = __toESM(require_react(), 1);
480622
480669
  import path135 from "node:path";
480623
480670
  import os38 from "node:os";
480624
480671
 
480625
480672
  // packages/cli/src/ui/hooks/useGitBranchName.ts
480626
480673
  init_esbuild_shims();
480627
- var import_react132 = __toESM(require_react(), 1);
480674
+ var import_react133 = __toESM(require_react(), 1);
480628
480675
  init_dist4();
480629
480676
  import fs124 from "node:fs";
480630
480677
  import fsPromises6 from "node:fs/promises";
480631
480678
  import path134 from "node:path";
480632
480679
  function useGitBranchName(cwd6) {
480633
- const [branchName, setBranchName] = (0, import_react132.useState)(void 0);
480634
- const fetchBranchName = (0, import_react132.useCallback)(async () => {
480680
+ const [branchName, setBranchName] = (0, import_react133.useState)(void 0);
480681
+ const fetchBranchName = (0, import_react133.useCallback)(async () => {
480635
480682
  try {
480636
480683
  if (!isCommandAvailable("git").available) {
480637
480684
  return;
@@ -480656,7 +480703,7 @@ function useGitBranchName(cwd6) {
480656
480703
  setBranchName(void 0);
480657
480704
  }
480658
480705
  }, [cwd6, setBranchName]);
480659
- (0, import_react132.useEffect)(() => {
480706
+ (0, import_react133.useEffect)(() => {
480660
480707
  fetchBranchName();
480661
480708
  const gitLogsHeadPath = path134.join(cwd6, ".git", "logs", "HEAD");
480662
480709
  let watcher;
@@ -480682,11 +480729,11 @@ __name(useGitBranchName, "useGitBranchName");
480682
480729
 
480683
480730
  // packages/cli/src/ui/hooks/useGitDiffStat.ts
480684
480731
  init_esbuild_shims();
480685
- var import_react133 = __toESM(require_react(), 1);
480732
+ var import_react134 = __toESM(require_react(), 1);
480686
480733
  init_dist4();
480687
480734
  function useGitDiffStat(cwd6, intervalMs = 5e3) {
480688
- const [stat14, setStat] = (0, import_react133.useState)(null);
480689
- const fetchStat = (0, import_react133.useCallback)(async () => {
480735
+ const [stat14, setStat] = (0, import_react134.useState)(null);
480736
+ const fetchStat = (0, import_react134.useCallback)(async () => {
480690
480737
  try {
480691
480738
  if (!isCommandAvailable("git").available) {
480692
480739
  setStat(null);
@@ -480723,7 +480770,7 @@ function useGitDiffStat(cwd6, intervalMs = 5e3) {
480723
480770
  setStat(null);
480724
480771
  }
480725
480772
  }, [cwd6]);
480726
- (0, import_react133.useEffect)(() => {
480773
+ (0, import_react134.useEffect)(() => {
480727
480774
  fetchStat();
480728
480775
  const timer = setInterval(fetchStat, intervalMs);
480729
480776
  return () => clearInterval(timer);
@@ -480734,12 +480781,12 @@ __name(useGitDiffStat, "useGitDiffStat");
480734
480781
 
480735
480782
  // packages/cli/src/ui/hooks/useBackgroundAgentProgress.ts
480736
480783
  init_esbuild_shims();
480737
- var import_react134 = __toESM(require_react(), 1);
480784
+ var import_react135 = __toESM(require_react(), 1);
480738
480785
  init_dist4();
480739
480786
  function useBackgroundAgentProgress() {
480740
- const [activeAgents, setActiveAgents] = (0, import_react134.useState)(/* @__PURE__ */ new Map());
480741
- const [lastFinished, setLastFinished] = (0, import_react134.useState)(null);
480742
- (0, import_react134.useEffect)(() => {
480787
+ const [activeAgents, setActiveAgents] = (0, import_react135.useState)(/* @__PURE__ */ new Map());
480788
+ const [lastFinished, setLastFinished] = (0, import_react135.useState)(null);
480789
+ (0, import_react135.useEffect)(() => {
480743
480790
  const onStarted = /* @__PURE__ */ __name((payload) => {
480744
480791
  setActiveAgents((prev) => {
480745
480792
  const next = new Map(prev);
@@ -480820,8 +480867,8 @@ function useBackgroundAgentProgress() {
480820
480867
  __name(useBackgroundAgentProgress, "useBackgroundAgentProgress");
480821
480868
 
480822
480869
  // packages/cli/src/ui/components/StatusBar.tsx
480823
- var import_jsx_runtime140 = __toESM(require_jsx_runtime(), 1);
480824
- var Badge = /* @__PURE__ */ __name(({ children, dim, color }) => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
480870
+ var import_jsx_runtime141 = __toESM(require_jsx_runtime(), 1);
480871
+ var Badge = /* @__PURE__ */ __name(({ children, dim, color }) => /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
480825
480872
  Text3,
480826
480873
  {
480827
480874
  color: color ?? (dim ? theme.text.secondary : theme.text.primary),
@@ -480829,7 +480876,7 @@ var Badge = /* @__PURE__ */ __name(({ children, dim, color }) => /* @__PURE__ */
480829
480876
  children
480830
480877
  }
480831
480878
  ) }), "Badge");
480832
- var Sep = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Text3, { color: theme.border.default, children: " \u2502 " }), "Sep");
480879
+ var Sep = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Text3, { color: theme.border.default, children: " \u2502 " }), "Sep");
480833
480880
  function tildify(p2) {
480834
480881
  const home = os38.homedir();
480835
480882
  if (p2 === home) return "~";
@@ -480847,7 +480894,7 @@ var StatusBar = /* @__PURE__ */ __name(({
480847
480894
  const { activeAgents } = useBackgroundAgentProgress();
480848
480895
  const cwdDisplay = tildify(path135.resolve(cwd6));
480849
480896
  const hasDiff = diff4 !== null && diff4.filesChanged > 0;
480850
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
480897
+ return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
480851
480898
  Box_default,
480852
480899
  {
480853
480900
  width: terminalWidth,
@@ -480861,51 +480908,51 @@ var StatusBar = /* @__PURE__ */ __name(({
480861
480908
  borderColor: theme.border.default,
480862
480909
  paddingX: 1,
480863
480910
  children: [
480864
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Text3, { color: theme.text.accent, bold: true, children: "\u27E1" }),
480865
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Sep, {}),
480866
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(Badge, { dim: true, children: [
480867
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Text3, { children: "\u2B21 " }),
480868
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Text3, { children: os38.hostname() })
480911
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Text3, { color: theme.text.accent, bold: true, children: "\u27E1" }),
480912
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Sep, {}),
480913
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(Badge, { dim: true, children: [
480914
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Text3, { children: "\u2B21 " }),
480915
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Text3, { children: os38.hostname() })
480869
480916
  ] }),
480870
480917
  activeAgents.map((agent) => {
480871
480918
  const label = agent.agentName === "session-memory" ? agent.toolName ? "\u21BA notes: writing" : `\u21BA notes: turn ${agent.round}` : agent.toolName ? `\u27F3 ${agent.agentName}: ${agent.toolName}` : `\u27F3 ${agent.agentName}: turn ${agent.round}`;
480872
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_react135.default.Fragment, { children: [
480873
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Sep, {}),
480874
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Badge, { children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Text3, { color: theme.text.secondary, children: label }) })
480919
+ return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_react136.default.Fragment, { children: [
480920
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Sep, {}),
480921
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Badge, { children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Text3, { color: theme.text.secondary, children: label }) })
480875
480922
  ] }, agent.agentId);
480876
480923
  }),
480877
- bgSessionActive && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_jsx_runtime140.Fragment, { children: [
480878
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Sep, {}),
480879
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Badge, { children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Text3, { color: theme.text.secondary, children: "\u27F3 bg session" }) })
480924
+ bgSessionActive && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
480925
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Sep, {}),
480926
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Badge, { children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Text3, { color: theme.text.secondary, children: "\u27F3 bg session" }) })
480880
480927
  ] }),
480881
- hasDiff && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_jsx_runtime140.Fragment, { children: [
480882
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Sep, {}),
480883
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(Badge, { children: [
480884
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(Text3, { color: theme.text.secondary, children: [
480928
+ hasDiff && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
480929
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Sep, {}),
480930
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(Badge, { children: [
480931
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(Text3, { color: theme.text.secondary, children: [
480885
480932
  diff4.filesChanged,
480886
480933
  " file",
480887
480934
  diff4.filesChanged !== 1 ? "s" : ""
480888
480935
  ] }),
480889
- diff4.linesAdded > 0 && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(Text3, { color: theme.status.success, children: [
480936
+ diff4.linesAdded > 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(Text3, { color: theme.status.success, children: [
480890
480937
  " +",
480891
480938
  diff4.linesAdded
480892
480939
  ] }),
480893
- diff4.linesRemoved > 0 && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(Text3, { color: theme.status.error, children: [
480940
+ diff4.linesRemoved > 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(Text3, { color: theme.status.error, children: [
480894
480941
  " \u2212",
480895
480942
  diff4.linesRemoved
480896
480943
  ] })
480897
480944
  ] })
480898
480945
  ] }),
480899
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Sep, {}),
480900
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(Badge, { dim: true, children: [
480901
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Text3, { children: "\u2302 " }),
480902
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Text3, { children: cwdDisplay })
480946
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Sep, {}),
480947
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(Badge, { dim: true, children: [
480948
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Text3, { children: "\u2302 " }),
480949
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Text3, { children: cwdDisplay })
480903
480950
  ] }),
480904
- branch && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_jsx_runtime140.Fragment, { children: [
480905
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Sep, {}),
480906
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(Badge, { children: [
480907
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Text3, { color: theme.text.secondary, children: "\u2387 " }),
480908
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Text3, { color: theme.text.primary, children: branch })
480951
+ branch && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
480952
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Sep, {}),
480953
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(Badge, { children: [
480954
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Text3, { color: theme.text.secondary, children: "\u2387 " }),
480955
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Text3, { color: theme.text.primary, children: branch })
480909
480956
  ] })
480910
480957
  ] })
480911
480958
  ]
@@ -480914,7 +480961,7 @@ var StatusBar = /* @__PURE__ */ __name(({
480914
480961
  }, "StatusBar");
480915
480962
 
480916
480963
  // packages/cli/src/ui/layouts/DefaultAppLayout.tsx
480917
- var import_jsx_runtime141 = __toESM(require_jsx_runtime(), 1);
480964
+ var import_jsx_runtime142 = __toESM(require_jsx_runtime(), 1);
480918
480965
  var DefaultAppLayout = /* @__PURE__ */ __name(() => {
480919
480966
  const uiState = useUIState();
480920
480967
  const { refreshStatic } = useUIActions();
@@ -480923,30 +480970,30 @@ var DefaultAppLayout = /* @__PURE__ */ __name(() => {
480923
480970
  const config2 = useConfig();
480924
480971
  const hasAgents = agents.size > 0;
480925
480972
  const isAgentTab = activeView !== "main" && agents.has(activeView);
480926
- const prevViewRef = (0, import_react136.useRef)(activeView);
480927
- (0, import_react136.useEffect)(() => {
480973
+ const prevViewRef = (0, import_react137.useRef)(activeView);
480974
+ (0, import_react137.useEffect)(() => {
480928
480975
  if (prevViewRef.current !== activeView) {
480929
480976
  prevViewRef.current = activeView;
480930
480977
  refreshStatic();
480931
480978
  }
480932
480979
  }, [activeView, refreshStatic]);
480933
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(Box_default, { flexDirection: "column", width: terminalWidth, children: [
480934
- isAgentTab ? /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
480935
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(AgentChatView, { agentId: activeView }),
480936
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(Box_default, { flexDirection: "column", ref: uiState.mainControlsRef, children: [
480937
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(AgentComposer, { agentId: activeView }, activeView),
480938
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(ExitWarning, {})
480980
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(Box_default, { flexDirection: "column", width: terminalWidth, children: [
480981
+ isAgentTab ? /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [
480982
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(AgentChatView, { agentId: activeView }),
480983
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(Box_default, { flexDirection: "column", ref: uiState.mainControlsRef, children: [
480984
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(AgentComposer, { agentId: activeView }, activeView),
480985
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(ExitWarning, {})
480939
480986
  ] })
480940
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
480941
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(MainContent, {}),
480942
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(Box_default, { flexDirection: "column", ref: uiState.mainControlsRef, children: [
480943
- uiState.dialogsVisible ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
480987
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [
480988
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(MainContent, {}),
480989
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(Box_default, { flexDirection: "column", ref: uiState.mainControlsRef, children: [
480990
+ uiState.dialogsVisible ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
480944
480991
  Box_default,
480945
480992
  {
480946
480993
  marginX: 2,
480947
480994
  flexDirection: "column",
480948
480995
  width: uiState.mainAreaWidth,
480949
- children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
480996
+ children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
480950
480997
  DialogManager,
480951
480998
  {
480952
480999
  terminalWidth: uiState.terminalWidth,
@@ -480954,12 +481001,12 @@ var DefaultAppLayout = /* @__PURE__ */ __name(() => {
480954
481001
  }
480955
481002
  )
480956
481003
  }
480957
- ) : uiState.btwItem ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Box_default, { marginX: 2, width: terminalWidth - 4, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(BtwMessage, { btw: uiState.btwItem.btw }) }) : /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Composer, {}),
480958
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(ExitWarning, {})
481004
+ ) : uiState.btwItem ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Box_default, { marginX: 2, width: terminalWidth - 4, children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(BtwMessage, { btw: uiState.btwItem.btw }) }) : /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Composer, {}),
481005
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(ExitWarning, {})
480959
481006
  ] })
480960
481007
  ] }),
480961
- hasAgents && !uiState.dialogsVisible && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(AgentTabBar, {}),
480962
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
481008
+ hasAgents && !uiState.dialogsVisible && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(AgentTabBar, {}),
481009
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
480963
481010
  StatusBar,
480964
481011
  {
480965
481012
  cwd: config2.getTargetDir(),
@@ -480971,14 +481018,14 @@ var DefaultAppLayout = /* @__PURE__ */ __name(() => {
480971
481018
  }, "DefaultAppLayout");
480972
481019
 
480973
481020
  // packages/cli/src/ui/App.tsx
480974
- var import_jsx_runtime142 = __toESM(require_jsx_runtime(), 1);
481021
+ var import_jsx_runtime143 = __toESM(require_jsx_runtime(), 1);
480975
481022
  var App2 = /* @__PURE__ */ __name(() => {
480976
481023
  const uiState = useUIState();
480977
481024
  const isScreenReaderEnabled = use_is_screen_reader_enabled_default();
480978
481025
  if (uiState.quittingMessages) {
480979
- return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(QuittingDisplay, {});
481026
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(QuittingDisplay, {});
480980
481027
  }
480981
- return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(StreamingContext.Provider, { value: uiState.streamingState, children: isScreenReaderEnabled ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(ScreenReaderAppLayout, {}) : /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(DefaultAppLayout, {}) });
481028
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(StreamingContext.Provider, { value: uiState.streamingState, children: isScreenReaderEnabled ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(ScreenReaderAppLayout, {}) : /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(DefaultAppLayout, {}) });
480982
481029
  }, "App");
480983
481030
 
480984
481031
  // packages/cli/src/ui/AppContainer.tsx
@@ -480987,12 +481034,12 @@ import process49 from "node:process";
480987
481034
 
480988
481035
  // packages/cli/src/ui/hooks/useMemoryMonitor.ts
480989
481036
  init_esbuild_shims();
480990
- var import_react137 = __toESM(require_react(), 1);
481037
+ var import_react138 = __toESM(require_react(), 1);
480991
481038
  import process36 from "node:process";
480992
481039
  var MEMORY_WARNING_THRESHOLD = 7 * 1024 * 1024 * 1024;
480993
481040
  var MEMORY_CHECK_INTERVAL = 60 * 1e3;
480994
481041
  var useMemoryMonitor = /* @__PURE__ */ __name(({ addItem }) => {
480995
- (0, import_react137.useEffect)(() => {
481042
+ (0, import_react138.useEffect)(() => {
480996
481043
  const intervalId = setInterval(() => {
480997
481044
  const usage2 = process36.memoryUsage().rss;
480998
481045
  if (usage2 > MEMORY_WARNING_THRESHOLD) {
@@ -481012,11 +481059,11 @@ var useMemoryMonitor = /* @__PURE__ */ __name(({ addItem }) => {
481012
481059
 
481013
481060
  // packages/cli/src/ui/hooks/useThemeCommand.ts
481014
481061
  init_esbuild_shims();
481015
- var import_react138 = __toESM(require_react(), 1);
481062
+ var import_react139 = __toESM(require_react(), 1);
481016
481063
  import process37 from "node:process";
481017
481064
  var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, addItem, initialThemeError) => {
481018
- const [isThemeDialogOpen, setIsThemeDialogOpen] = (0, import_react138.useState)(!!initialThemeError);
481019
- const openThemeDialog = (0, import_react138.useCallback)(() => {
481065
+ const [isThemeDialogOpen, setIsThemeDialogOpen] = (0, import_react139.useState)(!!initialThemeError);
481066
+ const openThemeDialog = (0, import_react139.useCallback)(() => {
481020
481067
  if (process37.env["NO_COLOR"]) {
481021
481068
  addItem(
481022
481069
  {
@@ -481031,7 +481078,7 @@ var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, add
481031
481078
  }
481032
481079
  setIsThemeDialogOpen(true);
481033
481080
  }, [addItem]);
481034
- const applyTheme = (0, import_react138.useCallback)(
481081
+ const applyTheme = (0, import_react139.useCallback)(
481035
481082
  (themeName) => {
481036
481083
  if (!themeManager.setActiveTheme(themeName)) {
481037
481084
  setIsThemeDialogOpen(true);
@@ -481046,13 +481093,13 @@ var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, add
481046
481093
  },
481047
481094
  [setThemeError]
481048
481095
  );
481049
- const handleThemeHighlight = (0, import_react138.useCallback)(
481096
+ const handleThemeHighlight = (0, import_react139.useCallback)(
481050
481097
  (themeName) => {
481051
481098
  applyTheme(themeName);
481052
481099
  },
481053
481100
  [applyTheme]
481054
481101
  );
481055
- const handleThemeSelect = (0, import_react138.useCallback)(
481102
+ const handleThemeSelect = (0, import_react139.useCallback)(
481056
481103
  (themeName, scope) => {
481057
481104
  try {
481058
481105
  const mergedCustomThemes = {
@@ -481093,7 +481140,7 @@ var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, add
481093
481140
 
481094
481141
  // packages/cli/src/ui/hooks/useFeedbackDialog.ts
481095
481142
  init_esbuild_shims();
481096
- var import_react139 = __toESM(require_react(), 1);
481143
+ var import_react140 = __toESM(require_react(), 1);
481097
481144
  init_dist4();
481098
481145
  import * as fs125 from "node:fs";
481099
481146
  var import_strip_json_comments3 = __toESM(require_strip_json_comments(), 1);
@@ -481139,20 +481186,20 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
481139
481186
  history,
481140
481187
  sessionStats
481141
481188
  }) => {
481142
- const [isFeedbackDialogOpen, setIsFeedbackDialogOpen] = (0, import_react139.useState)(false);
481143
- const [isFeedbackDismissedTemporarily, setIsFeedbackDismissedTemporarily] = (0, import_react139.useState)(false);
481144
- const openFeedbackDialog = (0, import_react139.useCallback)(() => {
481189
+ const [isFeedbackDialogOpen, setIsFeedbackDialogOpen] = (0, import_react140.useState)(false);
481190
+ const [isFeedbackDismissedTemporarily, setIsFeedbackDismissedTemporarily] = (0, import_react140.useState)(false);
481191
+ const openFeedbackDialog = (0, import_react140.useCallback)(() => {
481145
481192
  setIsFeedbackDialogOpen(true);
481146
481193
  }, []);
481147
- const closeFeedbackDialog = (0, import_react139.useCallback)(
481194
+ const closeFeedbackDialog = (0, import_react140.useCallback)(
481148
481195
  () => setIsFeedbackDialogOpen(false),
481149
481196
  []
481150
481197
  );
481151
- const temporaryCloseFeedbackDialog = (0, import_react139.useCallback)(() => {
481198
+ const temporaryCloseFeedbackDialog = (0, import_react140.useCallback)(() => {
481152
481199
  setIsFeedbackDialogOpen(false);
481153
481200
  setIsFeedbackDismissedTemporarily(true);
481154
481201
  }, []);
481155
- const submitFeedback = (0, import_react139.useCallback)(
481202
+ const submitFeedback = (0, import_react140.useCallback)(
481156
481203
  (rating) => {
481157
481204
  if (rating >= FEEDBACK_OPTIONS.GOOD && rating <= FEEDBACK_OPTIONS.FINE) {
481158
481205
  const feedbackEvent = new UserFeedbackEvent(
@@ -481172,7 +481219,7 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
481172
481219
  },
481173
481220
  [closeFeedbackDialog, sessionStats.sessionId, config2, settings2]
481174
481221
  );
481175
- (0, import_react139.useEffect)(() => {
481222
+ (0, import_react140.useEffect)(() => {
481176
481223
  const checkAndShowFeedback = /* @__PURE__ */ __name(() => {
481177
481224
  if (streamingState === "idle" /* Idle */ && history.length > 0) {
481178
481225
  if (!config2.getUsageStatisticsEnabled() || settings2.merged.ui?.enableUserFeedback === false || !lastMessageIsAIResponse(history) || Math.random() > FEEDBACK_SHOW_PROBABILITY || !meetsMinimumSessionRequirements(sessionStats) || isFeedbackDismissedTemporarily) {
@@ -481194,7 +481241,7 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
481194
481241
  settings2.merged.ui?.enableUserFeedback,
481195
481242
  config2
481196
481243
  ]);
481197
- (0, import_react139.useEffect)(() => {
481244
+ (0, import_react140.useEffect)(() => {
481198
481245
  if (streamingState === "responding" /* Responding */ && isFeedbackDismissedTemporarily) {
481199
481246
  setIsFeedbackDismissedTemporarily(false);
481200
481247
  }
@@ -481211,19 +481258,19 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
481211
481258
  // packages/cli/src/ui/auth/useAuth.ts
481212
481259
  init_esbuild_shims();
481213
481260
  init_dist4();
481214
- var import_react140 = __toESM(require_react(), 1);
481261
+ var import_react141 = __toESM(require_react(), 1);
481215
481262
  var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuthChange) => {
481216
481263
  const unAuthenticated = config2.getAuthType() === void 0;
481217
- const [authState, setAuthState] = (0, import_react140.useState)(
481264
+ const [authState, setAuthState] = (0, import_react141.useState)(
481218
481265
  unAuthenticated ? "updating" /* Updating */ : "unauthenticated" /* Unauthenticated */
481219
481266
  );
481220
- const [authError, setAuthError] = (0, import_react140.useState)(null);
481221
- const [isAuthenticating, setIsAuthenticating] = (0, import_react140.useState)(false);
481222
- const [isAuthDialogOpen, setIsAuthDialogOpen] = (0, import_react140.useState)(unAuthenticated);
481223
- const [pendingAuthType, setPendingAuthType] = (0, import_react140.useState)(
481267
+ const [authError, setAuthError] = (0, import_react141.useState)(null);
481268
+ const [isAuthenticating, setIsAuthenticating] = (0, import_react141.useState)(false);
481269
+ const [isAuthDialogOpen, setIsAuthDialogOpen] = (0, import_react141.useState)(unAuthenticated);
481270
+ const [pendingAuthType, setPendingAuthType] = (0, import_react141.useState)(
481224
481271
  void 0
481225
481272
  );
481226
- const onAuthError = (0, import_react140.useCallback)(
481273
+ const onAuthError = (0, import_react141.useCallback)(
481227
481274
  (error40) => {
481228
481275
  setAuthError(error40);
481229
481276
  if (error40) {
@@ -481233,7 +481280,7 @@ var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuth
481233
481280
  },
481234
481281
  [setAuthError, setAuthState]
481235
481282
  );
481236
- const handleAuthFailure = (0, import_react140.useCallback)(
481283
+ const handleAuthFailure = (0, import_react141.useCallback)(
481237
481284
  (error40) => {
481238
481285
  setIsAuthenticating(false);
481239
481286
  const errorMessage = t4("Failed to authenticate. Message: {{message}}", {
@@ -481252,7 +481299,7 @@ var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuth
481252
481299
  },
481253
481300
  [onAuthError, pendingAuthType, config2]
481254
481301
  );
481255
- const handleAuthSuccess = (0, import_react140.useCallback)(
481302
+ const handleAuthSuccess = (0, import_react141.useCallback)(
481256
481303
  async (authType, credentials) => {
481257
481304
  try {
481258
481305
  const authTypeScope = getPersistScopeForModelSelection(settings2);
@@ -481309,7 +481356,7 @@ var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuth
481309
481356
  },
481310
481357
  [settings2, handleAuthFailure, config2, addItem, onAuthChange]
481311
481358
  );
481312
- const performAuth = (0, import_react140.useCallback)(
481359
+ const performAuth = (0, import_react141.useCallback)(
481313
481360
  async (authType, credentials) => {
481314
481361
  try {
481315
481362
  await config2.refreshAuth(authType);
@@ -481320,7 +481367,7 @@ var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuth
481320
481367
  },
481321
481368
  [config2, handleAuthSuccess, handleAuthFailure]
481322
481369
  );
481323
- const isProviderManagedModel = (0, import_react140.useCallback)(
481370
+ const isProviderManagedModel = (0, import_react141.useCallback)(
481324
481371
  (authType, modelId) => {
481325
481372
  if (!modelId) {
481326
481373
  return false;
@@ -481339,7 +481386,7 @@ var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuth
481339
481386
  },
481340
481387
  [settings2]
481341
481388
  );
481342
- const handleAuthSelect = (0, import_react140.useCallback)(
481389
+ const handleAuthSelect = (0, import_react141.useCallback)(
481343
481390
  async (authType, credentials) => {
481344
481391
  if (!authType) {
481345
481392
  setIsAuthDialogOpen(false);
@@ -481384,10 +481431,10 @@ var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuth
481384
481431
  settings2.merged.model?.generationConfig
481385
481432
  ]
481386
481433
  );
481387
- const openAuthDialog = (0, import_react140.useCallback)(() => {
481434
+ const openAuthDialog = (0, import_react141.useCallback)(() => {
481388
481435
  setIsAuthDialogOpen(true);
481389
481436
  }, []);
481390
- const cancelAuthentication = (0, import_react140.useCallback)(() => {
481437
+ const cancelAuthentication = (0, import_react141.useCallback)(() => {
481391
481438
  if (isAuthenticating && pendingAuthType) {
481392
481439
  const authEvent = new AuthEvent(pendingAuthType, "manual", "cancelled");
481393
481440
  logAuth(config2, authEvent);
@@ -481396,7 +481443,7 @@ var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuth
481396
481443
  setIsAuthDialogOpen(true);
481397
481444
  setAuthError(null);
481398
481445
  }, [isAuthenticating, pendingAuthType, config2]);
481399
- const handleCodingPlanSubmit = (0, import_react140.useCallback)(
481446
+ const handleCodingPlanSubmit = (0, import_react141.useCallback)(
481400
481447
  async (apiKey, region = "china" /* CHINA */) => {
481401
481448
  try {
481402
481449
  setIsAuthenticating(true);
@@ -481475,7 +481522,7 @@ var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuth
481475
481522
  },
481476
481523
  [settings2, config2, handleAuthFailure, addItem, onAuthChange]
481477
481524
  );
481478
- const handleAlibabaStandardSubmit = (0, import_react140.useCallback)(
481525
+ const handleAlibabaStandardSubmit = (0, import_react141.useCallback)(
481479
481526
  async (apiKey, region, modelIdsInput) => {
481480
481527
  try {
481481
481528
  setIsAuthenticating(true);
@@ -481567,7 +481614,7 @@ var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuth
481567
481614
  },
481568
481615
  [settings2, config2, handleAuthFailure, addItem, onAuthChange]
481569
481616
  );
481570
- (0, import_react140.useEffect)(() => {
481617
+ (0, import_react141.useEffect)(() => {
481571
481618
  const defaultAuthType = process.env["QWEN_DEFAULT_AUTH_TYPE"];
481572
481619
  if (defaultAuthType && ![
481573
481620
  AuthType2.USE_OPENAI,
@@ -481609,14 +481656,14 @@ var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuth
481609
481656
 
481610
481657
  // packages/cli/src/ui/hooks/useEditorSettings.ts
481611
481658
  init_esbuild_shims();
481612
- var import_react141 = __toESM(require_react(), 1);
481659
+ var import_react142 = __toESM(require_react(), 1);
481613
481660
  init_dist4();
481614
481661
  var useEditorSettings = /* @__PURE__ */ __name((loadedSettings, setEditorError, addItem) => {
481615
- const [isEditorDialogOpen, setIsEditorDialogOpen] = (0, import_react141.useState)(false);
481616
- const openEditorDialog = (0, import_react141.useCallback)(() => {
481662
+ const [isEditorDialogOpen, setIsEditorDialogOpen] = (0, import_react142.useState)(false);
481663
+ const openEditorDialog = (0, import_react142.useCallback)(() => {
481617
481664
  setIsEditorDialogOpen(true);
481618
481665
  }, []);
481619
- const handleEditorSelect = (0, import_react141.useCallback)(
481666
+ const handleEditorSelect = (0, import_react142.useCallback)(
481620
481667
  (editorType, scope) => {
481621
481668
  if (editorType && (!checkHasEditorType(editorType) || !allowEditorTypeInSandbox(editorType))) {
481622
481669
  return;
@@ -481638,7 +481685,7 @@ var useEditorSettings = /* @__PURE__ */ __name((loadedSettings, setEditorError,
481638
481685
  },
481639
481686
  [loadedSettings, setEditorError, addItem]
481640
481687
  );
481641
- const exitEditorDialog = (0, import_react141.useCallback)(() => {
481688
+ const exitEditorDialog = (0, import_react142.useCallback)(() => {
481642
481689
  setIsEditorDialogOpen(false);
481643
481690
  }, []);
481644
481691
  return {
@@ -481651,13 +481698,13 @@ var useEditorSettings = /* @__PURE__ */ __name((loadedSettings, setEditorError,
481651
481698
 
481652
481699
  // packages/cli/src/ui/hooks/useSettingsCommand.ts
481653
481700
  init_esbuild_shims();
481654
- var import_react142 = __toESM(require_react(), 1);
481701
+ var import_react143 = __toESM(require_react(), 1);
481655
481702
  function useSettingsCommand() {
481656
- const [isSettingsDialogOpen, setIsSettingsDialogOpen] = (0, import_react142.useState)(false);
481657
- const openSettingsDialog = (0, import_react142.useCallback)(() => {
481703
+ const [isSettingsDialogOpen, setIsSettingsDialogOpen] = (0, import_react143.useState)(false);
481704
+ const openSettingsDialog = (0, import_react143.useCallback)(() => {
481658
481705
  setIsSettingsDialogOpen(true);
481659
481706
  }, []);
481660
- const closeSettingsDialog = (0, import_react142.useCallback)(() => {
481707
+ const closeSettingsDialog = (0, import_react143.useCallback)(() => {
481661
481708
  setIsSettingsDialogOpen(false);
481662
481709
  }, []);
481663
481710
  return {
@@ -481670,18 +481717,18 @@ __name(useSettingsCommand, "useSettingsCommand");
481670
481717
 
481671
481718
  // packages/cli/src/ui/hooks/useModelCommand.ts
481672
481719
  init_esbuild_shims();
481673
- var import_react143 = __toESM(require_react(), 1);
481720
+ var import_react144 = __toESM(require_react(), 1);
481674
481721
  var useModelCommand = /* @__PURE__ */ __name(() => {
481675
- const [isModelDialogOpen, setIsModelDialogOpen] = (0, import_react143.useState)(false);
481676
- const [isFastModelMode, setIsFastModelMode] = (0, import_react143.useState)(false);
481677
- const openModelDialog = (0, import_react143.useCallback)(
481722
+ const [isModelDialogOpen, setIsModelDialogOpen] = (0, import_react144.useState)(false);
481723
+ const [isFastModelMode, setIsFastModelMode] = (0, import_react144.useState)(false);
481724
+ const openModelDialog = (0, import_react144.useCallback)(
481678
481725
  (options2) => {
481679
481726
  setIsFastModelMode(options2?.fastModelMode ?? false);
481680
481727
  setIsModelDialogOpen(true);
481681
481728
  },
481682
481729
  []
481683
481730
  );
481684
- const closeModelDialog = (0, import_react143.useCallback)(() => {
481731
+ const closeModelDialog = (0, import_react144.useCallback)(() => {
481685
481732
  setIsModelDialogOpen(false);
481686
481733
  setIsFastModelMode(false);
481687
481734
  }, []);
@@ -481695,13 +481742,13 @@ var useModelCommand = /* @__PURE__ */ __name(() => {
481695
481742
 
481696
481743
  // packages/cli/src/ui/hooks/useApprovalModeCommand.ts
481697
481744
  init_esbuild_shims();
481698
- var import_react144 = __toESM(require_react(), 1);
481745
+ var import_react145 = __toESM(require_react(), 1);
481699
481746
  var useApprovalModeCommand = /* @__PURE__ */ __name((loadedSettings, config2) => {
481700
- const [isApprovalModeDialogOpen, setIsApprovalModeDialogOpen] = (0, import_react144.useState)(false);
481701
- const openApprovalModeDialog = (0, import_react144.useCallback)(() => {
481747
+ const [isApprovalModeDialogOpen, setIsApprovalModeDialogOpen] = (0, import_react145.useState)(false);
481748
+ const openApprovalModeDialog = (0, import_react145.useCallback)(() => {
481702
481749
  setIsApprovalModeDialogOpen(true);
481703
481750
  }, []);
481704
- const handleApprovalModeSelect = (0, import_react144.useCallback)(
481751
+ const handleApprovalModeSelect = (0, import_react145.useCallback)(
481705
481752
  (mode, scope) => {
481706
481753
  try {
481707
481754
  if (!mode) {
@@ -481727,24 +481774,24 @@ var useApprovalModeCommand = /* @__PURE__ */ __name((loadedSettings, config2) =>
481727
481774
 
481728
481775
  // packages/cli/src/ui/hooks/useResumeCommand.ts
481729
481776
  init_esbuild_shims();
481730
- var import_react145 = __toESM(require_react(), 1);
481777
+ var import_react146 = __toESM(require_react(), 1);
481731
481778
  init_dist4();
481732
481779
  function useResumeCommand(options2) {
481733
- const [isResumeDialogOpen, setIsResumeDialogOpen] = (0, import_react145.useState)(false);
481734
- const [resumeMatchedSessions, setResumeMatchedSessions] = (0, import_react145.useState)();
481735
- const openResumeDialog = (0, import_react145.useCallback)(
481780
+ const [isResumeDialogOpen, setIsResumeDialogOpen] = (0, import_react146.useState)(false);
481781
+ const [resumeMatchedSessions, setResumeMatchedSessions] = (0, import_react146.useState)();
481782
+ const openResumeDialog = (0, import_react146.useCallback)(
481736
481783
  (matchedSessions) => {
481737
481784
  setResumeMatchedSessions(matchedSessions);
481738
481785
  setIsResumeDialogOpen(true);
481739
481786
  },
481740
481787
  []
481741
481788
  );
481742
- const closeResumeDialog = (0, import_react145.useCallback)(() => {
481789
+ const closeResumeDialog = (0, import_react146.useCallback)(() => {
481743
481790
  setIsResumeDialogOpen(false);
481744
481791
  setResumeMatchedSessions(void 0);
481745
481792
  }, []);
481746
481793
  const { config: config2, historyManager, startNewSession, setSessionName, remount } = options2 ?? {};
481747
- const handleResume = (0, import_react145.useCallback)(
481794
+ const handleResume = (0, import_react146.useCallback)(
481748
481795
  async (sessionId) => {
481749
481796
  if (!config2 || !historyManager || !startNewSession) {
481750
481797
  return false;
@@ -481797,17 +481844,17 @@ __name(useResumeCommand, "useResumeCommand");
481797
481844
 
481798
481845
  // packages/cli/src/ui/hooks/useDeleteCommand.ts
481799
481846
  init_esbuild_shims();
481800
- var import_react146 = __toESM(require_react(), 1);
481847
+ var import_react147 = __toESM(require_react(), 1);
481801
481848
  function useDeleteCommand(options2) {
481802
- const [isDeleteDialogOpen, setIsDeleteDialogOpen] = (0, import_react146.useState)(false);
481803
- const openDeleteDialog = (0, import_react146.useCallback)(() => {
481849
+ const [isDeleteDialogOpen, setIsDeleteDialogOpen] = (0, import_react147.useState)(false);
481850
+ const openDeleteDialog = (0, import_react147.useCallback)(() => {
481804
481851
  setIsDeleteDialogOpen(true);
481805
481852
  }, []);
481806
- const closeDeleteDialog = (0, import_react146.useCallback)(() => {
481853
+ const closeDeleteDialog = (0, import_react147.useCallback)(() => {
481807
481854
  setIsDeleteDialogOpen(false);
481808
481855
  }, []);
481809
481856
  const { config: config2, addItem } = options2 ?? {};
481810
- const handleDelete = (0, import_react146.useCallback)(
481857
+ const handleDelete = (0, import_react147.useCallback)(
481811
481858
  async (sessionId) => {
481812
481859
  if (!config2) {
481813
481860
  return;
@@ -481866,7 +481913,7 @@ __name(useDeleteCommand, "useDeleteCommand");
481866
481913
 
481867
481914
  // packages/cli/src/ui/hooks/slashCommandProcessor.ts
481868
481915
  init_esbuild_shims();
481869
- var import_react147 = __toESM(require_react(), 1);
481916
+ var import_react148 = __toESM(require_react(), 1);
481870
481917
 
481871
481918
  // packages/cli/node_modules/@google/genai/dist/node/index.mjs
481872
481919
  init_esbuild_shims();
@@ -482582,34 +482629,34 @@ var SLASH_COMMANDS_SKIP_RECORDING = /* @__PURE__ */ new Set([
482582
482629
  ]);
482583
482630
  var useSlashCommandProcessor = /* @__PURE__ */ __name((config2, settings2, addItem, clearItems, loadHistory, history, refreshStatic, toggleVimEnabled, isProcessing, setIsProcessing, setGeminiMdFileCount, actions, extensionsUpdateState, isConfigInitialized, logger10, setSessionName) => {
482584
482631
  const { stats: sessionStats, startNewSession } = useSessionStats();
482585
- const [commands, setCommands] = (0, import_react147.useState)([]);
482586
- const [reloadTrigger, setReloadTrigger] = (0, import_react147.useState)(0);
482587
- const reloadCommands = (0, import_react147.useCallback)(() => {
482632
+ const [commands, setCommands] = (0, import_react148.useState)([]);
482633
+ const [reloadTrigger, setReloadTrigger] = (0, import_react148.useState)(0);
482634
+ const reloadCommands = (0, import_react148.useCallback)(() => {
482588
482635
  setReloadTrigger((v2) => v2 + 1);
482589
482636
  }, []);
482590
- const [shellConfirmationRequest, setShellConfirmationRequest] = (0, import_react147.useState)(null);
482591
- const [confirmationRequest, setConfirmationRequest] = (0, import_react147.useState)(null);
482592
- const [sessionShellAllowlist, setSessionShellAllowlist] = (0, import_react147.useState)(
482637
+ const [shellConfirmationRequest, setShellConfirmationRequest] = (0, import_react148.useState)(null);
482638
+ const [confirmationRequest, setConfirmationRequest] = (0, import_react148.useState)(null);
482639
+ const [sessionShellAllowlist, setSessionShellAllowlist] = (0, import_react148.useState)(
482593
482640
  /* @__PURE__ */ new Set()
482594
482641
  );
482595
- const gitService = (0, import_react147.useMemo)(() => {
482642
+ const gitService = (0, import_react148.useMemo)(() => {
482596
482643
  if (!config2?.getProjectRoot()) {
482597
482644
  return;
482598
482645
  }
482599
482646
  return new GitService(config2.getProjectRoot(), config2.storage);
482600
482647
  }, [config2]);
482601
- const [pendingItem, setPendingItem] = (0, import_react147.useState)(
482648
+ const [pendingItem, setPendingItem] = (0, import_react148.useState)(
482602
482649
  null
482603
482650
  );
482604
- const [btwItem, setBtwItem] = (0, import_react147.useState)(null);
482605
- const btwAbortControllerRef = (0, import_react147.useRef)(null);
482606
- const cancelBtw = (0, import_react147.useCallback)(() => {
482651
+ const [btwItem, setBtwItem] = (0, import_react148.useState)(null);
482652
+ const btwAbortControllerRef = (0, import_react148.useRef)(null);
482653
+ const cancelBtw = (0, import_react148.useCallback)(() => {
482607
482654
  btwAbortControllerRef.current?.abort();
482608
482655
  btwAbortControllerRef.current = null;
482609
482656
  setBtwItem(null);
482610
482657
  }, []);
482611
- const abortControllerRef = (0, import_react147.useRef)(null);
482612
- const cancelSlashCommand = (0, import_react147.useCallback)(() => {
482658
+ const abortControllerRef = (0, import_react148.useRef)(null);
482659
+ const cancelSlashCommand = (0, import_react148.useCallback)(() => {
482613
482660
  cancelBtw();
482614
482661
  if (!abortControllerRef.current) {
482615
482662
  return;
@@ -482633,14 +482680,14 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config2, settings2, addIt
482633
482680
  },
482634
482681
  { isActive: isProcessing }
482635
482682
  );
482636
- const pendingHistoryItems = (0, import_react147.useMemo)(() => {
482683
+ const pendingHistoryItems = (0, import_react148.useMemo)(() => {
482637
482684
  const items = [];
482638
482685
  if (pendingItem != null) {
482639
482686
  items.push(pendingItem);
482640
482687
  }
482641
482688
  return items;
482642
482689
  }, [pendingItem]);
482643
- const addMessage = (0, import_react147.useCallback)(
482690
+ const addMessage = (0, import_react148.useCallback)(
482644
482691
  (message) => {
482645
482692
  let historyItemContent;
482646
482693
  if (message.type === "about" /* ABOUT */) {
@@ -482696,7 +482743,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config2, settings2, addIt
482696
482743
  },
482697
482744
  [addItem]
482698
482745
  );
482699
- const commandContext = (0, import_react147.useMemo)(
482746
+ const commandContext = (0, import_react148.useMemo)(
482700
482747
  () => ({
482701
482748
  services: {
482702
482749
  config: config2,
@@ -482762,7 +482809,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config2, settings2, addIt
482762
482809
  extensionsUpdateState
482763
482810
  ]
482764
482811
  );
482765
- (0, import_react147.useEffect)(() => {
482812
+ (0, import_react148.useEffect)(() => {
482766
482813
  if (!config2) {
482767
482814
  return;
482768
482815
  }
@@ -482780,7 +482827,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config2, settings2, addIt
482780
482827
  })();
482781
482828
  };
482782
482829
  }, [config2, reloadCommands]);
482783
- (0, import_react147.useEffect)(() => {
482830
+ (0, import_react148.useEffect)(() => {
482784
482831
  const controller = new AbortController();
482785
482832
  const load = /* @__PURE__ */ __name(async () => {
482786
482833
  try {
@@ -482808,7 +482855,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config2, settings2, addIt
482808
482855
  controller.abort();
482809
482856
  };
482810
482857
  }, [config2, reloadTrigger, isConfigInitialized]);
482811
- const handleSlashCommand2 = (0, import_react147.useCallback)(
482858
+ const handleSlashCommand2 = (0, import_react148.useCallback)(
482812
482859
  async (rawQuery, oneTimeShellAllowlist, overwriteConfirmed) => {
482813
482860
  if (typeof rawQuery !== "string") {
482814
482861
  return false;
@@ -483172,11 +483219,11 @@ import * as fs136 from "node:fs";
483172
483219
 
483173
483220
  // packages/cli/src/ui/hooks/useLogger.ts
483174
483221
  init_esbuild_shims();
483175
- var import_react148 = __toESM(require_react(), 1);
483222
+ var import_react149 = __toESM(require_react(), 1);
483176
483223
  init_dist4();
483177
483224
  var useLogger = /* @__PURE__ */ __name((storage, sessionId) => {
483178
- const [logger10, setLogger] = (0, import_react148.useState)(null);
483179
- (0, import_react148.useEffect)(() => {
483225
+ const [logger10, setLogger] = (0, import_react149.useState)(null);
483226
+ (0, import_react149.useEffect)(() => {
483180
483227
  if (!sessionId) {
483181
483228
  return;
483182
483229
  }
@@ -483191,12 +483238,12 @@ var useLogger = /* @__PURE__ */ __name((storage, sessionId) => {
483191
483238
 
483192
483239
  // packages/cli/src/ui/hooks/useGeminiStream.ts
483193
483240
  init_esbuild_shims();
483194
- var import_react152 = __toESM(require_react(), 1);
483241
+ var import_react153 = __toESM(require_react(), 1);
483195
483242
  init_dist4();
483196
483243
 
483197
483244
  // packages/cli/src/ui/hooks/shellCommandProcessor.ts
483198
483245
  init_esbuild_shims();
483199
- var import_react149 = __toESM(require_react(), 1);
483246
+ var import_react150 = __toESM(require_react(), 1);
483200
483247
  init_dist4();
483201
483248
  import crypto14 from "node:crypto";
483202
483249
  import path136 from "node:path";
@@ -483226,8 +483273,8 @@ ${modelContent}
483226
483273
  }
483227
483274
  __name(addShellCommandToGeminiHistory, "addShellCommandToGeminiHistory");
483228
483275
  var useShellCommandProcessor = /* @__PURE__ */ __name((addItemToHistory, setPendingHistoryItem, onExec, onDebugMessage, config2, geminiClient, setShellInputFocused, terminalWidth, terminalHeight) => {
483229
- const [activeShellPtyId, setActiveShellPtyId] = (0, import_react149.useState)(null);
483230
- const handleShellCommand = (0, import_react149.useCallback)(
483276
+ const [activeShellPtyId, setActiveShellPtyId] = (0, import_react150.useState)(null);
483277
+ const handleShellCommand = (0, import_react150.useCallback)(
483231
483278
  (rawQuery, abortSignal) => {
483232
483279
  if (typeof rawQuery !== "string" || rawQuery.trim() === "") {
483233
483280
  return false;
@@ -483534,11 +483581,11 @@ var findLastSafeSplitPoint = /* @__PURE__ */ __name((content) => {
483534
483581
 
483535
483582
  // packages/cli/src/ui/hooks/useStateAndRef.ts
483536
483583
  init_esbuild_shims();
483537
- var import_react150 = __toESM(require_react(), 1);
483584
+ var import_react151 = __toESM(require_react(), 1);
483538
483585
  var useStateAndRef = /* @__PURE__ */ __name((initialValue) => {
483539
- const [state, setState] = import_react150.default.useState(initialValue);
483540
- const ref = import_react150.default.useRef(initialValue);
483541
- const setStateInternal = import_react150.default.useCallback(
483586
+ const [state, setState] = import_react151.default.useState(initialValue);
483587
+ const ref = import_react151.default.useRef(initialValue);
483588
+ const setStateInternal = import_react151.default.useCallback(
483542
483589
  (newStateOrCallback) => {
483543
483590
  let newValue;
483544
483591
  if (typeof newStateOrCallback === "function") {
@@ -483557,11 +483604,11 @@ var useStateAndRef = /* @__PURE__ */ __name((initialValue) => {
483557
483604
  // packages/cli/src/ui/hooks/useReactToolScheduler.ts
483558
483605
  init_esbuild_shims();
483559
483606
  init_dist4();
483560
- var import_react151 = __toESM(require_react(), 1);
483607
+ var import_react152 = __toESM(require_react(), 1);
483561
483608
  var debugLogger156 = createDebugLogger("REACT_TOOL_SCHEDULER");
483562
483609
  function useReactToolScheduler(onComplete, config2, getPreferredEditor, onEditorClose) {
483563
- const [toolCallsForDisplay, setToolCallsForDisplay] = (0, import_react151.useState)([]);
483564
- const outputUpdateHandler = (0, import_react151.useCallback)(
483610
+ const [toolCallsForDisplay, setToolCallsForDisplay] = (0, import_react152.useState)([]);
483611
+ const outputUpdateHandler = (0, import_react152.useCallback)(
483565
483612
  (toolCallId, outputChunk) => {
483566
483613
  setToolCallsForDisplay(
483567
483614
  (prevCalls) => prevCalls.map((tc) => {
@@ -483575,13 +483622,13 @@ function useReactToolScheduler(onComplete, config2, getPreferredEditor, onEditor
483575
483622
  },
483576
483623
  []
483577
483624
  );
483578
- const allToolCallsCompleteHandler = (0, import_react151.useCallback)(
483625
+ const allToolCallsCompleteHandler = (0, import_react152.useCallback)(
483579
483626
  async (completedToolCalls) => {
483580
483627
  await onComplete(completedToolCalls);
483581
483628
  },
483582
483629
  [onComplete]
483583
483630
  );
483584
- const toolCallsUpdateHandler = (0, import_react151.useCallback)(
483631
+ const toolCallsUpdateHandler = (0, import_react152.useCallback)(
483585
483632
  (updatedCoreToolCalls) => {
483586
483633
  setToolCallsForDisplay(
483587
483634
  (prevTrackedCalls) => updatedCoreToolCalls.map((coreTc) => {
@@ -483608,7 +483655,7 @@ function useReactToolScheduler(onComplete, config2, getPreferredEditor, onEditor
483608
483655
  },
483609
483656
  [setToolCallsForDisplay]
483610
483657
  );
483611
- const scheduler = (0, import_react151.useMemo)(
483658
+ const scheduler = (0, import_react152.useMemo)(
483612
483659
  () => new CoreToolScheduler({
483613
483660
  config: config2,
483614
483661
  chatRecordingService: config2.getChatRecordingService(),
@@ -483627,13 +483674,13 @@ function useReactToolScheduler(onComplete, config2, getPreferredEditor, onEditor
483627
483674
  onEditorClose
483628
483675
  ]
483629
483676
  );
483630
- const schedule = (0, import_react151.useCallback)(
483677
+ const schedule = (0, import_react152.useCallback)(
483631
483678
  (request3, signal) => {
483632
483679
  void scheduler.schedule(request3, signal);
483633
483680
  },
483634
483681
  [scheduler]
483635
483682
  );
483636
- const markToolsAsSubmitted = (0, import_react151.useCallback)(
483683
+ const markToolsAsSubmitted = (0, import_react152.useCallback)(
483637
483684
  (callIdsToMark) => {
483638
483685
  setToolCallsForDisplay(
483639
483686
  (prevCalls) => prevCalls.map(
@@ -483643,8 +483690,8 @@ function useReactToolScheduler(onComplete, config2, getPreferredEditor, onEditor
483643
483690
  },
483644
483691
  []
483645
483692
  );
483646
- const lastForceCancelledCountRef = (0, import_react151.useRef)(0);
483647
- const forceCancelStaleToolCalls = (0, import_react151.useCallback)(() => {
483693
+ const lastForceCancelledCountRef = (0, import_react152.useRef)(0);
483694
+ const forceCancelStaleToolCalls = (0, import_react152.useCallback)(() => {
483648
483695
  lastForceCancelledCountRef.current = 0;
483649
483696
  setToolCallsForDisplay((prevCalls) => {
483650
483697
  let changed = 0;
@@ -483907,19 +483954,19 @@ function showCitations(settings2) {
483907
483954
  }
483908
483955
  __name(showCitations, "showCitations");
483909
483956
  var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, config2, settings2, onDebugMessage, handleSlashCommand2, shellModeActive, getPreferredEditor, onAuthError, performMemoryRefresh, modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError, onEditorClose, onCancelSubmit, setShellInputFocused, terminalWidth, terminalHeight, drainQueuedMessages) => {
483910
- const [initError, setInitError] = (0, import_react152.useState)(null);
483911
- const abortControllerRef = (0, import_react152.useRef)(null);
483912
- const flushBufferedStreamEventsRef = (0, import_react152.useRef)(/* @__PURE__ */ new Set());
483913
- const turnCancelledRef = (0, import_react152.useRef)(false);
483914
- const queryGuardRef = (0, import_react152.useRef)(new QueryGuard());
483915
- const lastPromptRef = (0, import_react152.useRef)(null);
483916
- const lastPromptErroredRef = (0, import_react152.useRef)(false);
483917
- const [isResponding, setIsResponding] = (0, import_react152.useState)(false);
483918
- const isBackgroundedRef = (0, import_react152.useRef)(false);
483919
- const bgResponseTextRef = (0, import_react152.useRef)("");
483920
- const [isBackgrounded, setIsBackgrounded] = (0, import_react152.useState)(false);
483921
- const pendingCompletedToolsRef = (0, import_react152.useRef)([]);
483922
- const [thought, setThought] = (0, import_react152.useState)(null);
483957
+ const [initError, setInitError] = (0, import_react153.useState)(null);
483958
+ const abortControllerRef = (0, import_react153.useRef)(null);
483959
+ const flushBufferedStreamEventsRef = (0, import_react153.useRef)(/* @__PURE__ */ new Set());
483960
+ const turnCancelledRef = (0, import_react153.useRef)(false);
483961
+ const queryGuardRef = (0, import_react153.useRef)(new QueryGuard());
483962
+ const lastPromptRef = (0, import_react153.useRef)(null);
483963
+ const lastPromptErroredRef = (0, import_react153.useRef)(false);
483964
+ const [isResponding, setIsResponding] = (0, import_react153.useState)(false);
483965
+ const isBackgroundedRef = (0, import_react153.useRef)(false);
483966
+ const bgResponseTextRef = (0, import_react153.useRef)("");
483967
+ const [isBackgrounded, setIsBackgrounded] = (0, import_react153.useState)(false);
483968
+ const pendingCompletedToolsRef = (0, import_react153.useRef)([]);
483969
+ const [thought, setThought] = (0, import_react153.useState)(null);
483923
483970
  const [pendingHistoryItem, pendingHistoryItemRef, setPendingHistoryItem] = useStateAndRef(null);
483924
483971
  const [
483925
483972
  pendingRetryErrorItem,
@@ -483931,10 +483978,10 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
483931
483978
  pendingRetryCountdownItemRef,
483932
483979
  setPendingRetryCountdownItem
483933
483980
  ] = useStateAndRef(null);
483934
- const retryCountdownTimerRef = (0, import_react152.useRef)(
483981
+ const retryCountdownTimerRef = (0, import_react153.useRef)(
483935
483982
  null
483936
483983
  );
483937
- const processedMemoryToolsRef = (0, import_react152.useRef)(/* @__PURE__ */ new Set());
483984
+ const processedMemoryToolsRef = (0, import_react153.useRef)(/* @__PURE__ */ new Set());
483938
483985
  const {
483939
483986
  startNewPrompt,
483940
483987
  getPromptCount,
@@ -483942,16 +483989,16 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
483942
483989
  } = useSessionStats();
483943
483990
  const storage = config2.storage;
483944
483991
  const logger10 = useLogger(storage, sessionStates.sessionId);
483945
- const gitService = (0, import_react152.useMemo)(() => {
483992
+ const gitService = (0, import_react153.useMemo)(() => {
483946
483993
  if (!config2.getProjectRoot()) {
483947
483994
  return;
483948
483995
  }
483949
483996
  return new GitService(config2.getProjectRoot(), storage);
483950
483997
  }, [config2, storage]);
483951
- const addItemRef = (0, import_react152.useRef)(addItem);
483998
+ const addItemRef = (0, import_react153.useRef)(addItem);
483952
483999
  addItemRef.current = addItem;
483953
- const onCompleteFnRef = (0, import_react152.useRef)(void 0);
483954
- const stableOnComplete = (0, import_react152.useCallback)(
484000
+ const onCompleteFnRef = (0, import_react153.useRef)(void 0);
484001
+ const stableOnComplete = (0, import_react153.useCallback)(
483955
484002
  async (completedToolCallsFromScheduler) => {
483956
484003
  if (completedToolCallsFromScheduler.length > 0) {
483957
484004
  addItemRef.current(
@@ -483974,17 +484021,17 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
483974
484021
  getPreferredEditor,
483975
484022
  onEditorClose
483976
484023
  );
483977
- const toolCallsRef = (0, import_react152.useRef)(toolCalls);
484024
+ const toolCallsRef = (0, import_react153.useRef)(toolCalls);
483978
484025
  toolCallsRef.current = toolCalls;
483979
- const markToolsAsSubmittedRef = (0, import_react152.useRef)(markToolsAsSubmitted);
484026
+ const markToolsAsSubmittedRef = (0, import_react153.useRef)(markToolsAsSubmitted);
483980
484027
  markToolsAsSubmittedRef.current = markToolsAsSubmitted;
483981
- const forceCancelStaleToolCallsRef = (0, import_react152.useRef)(forceCancelStaleToolCalls);
484028
+ const forceCancelStaleToolCallsRef = (0, import_react153.useRef)(forceCancelStaleToolCalls);
483982
484029
  forceCancelStaleToolCallsRef.current = forceCancelStaleToolCalls;
483983
- const pendingToolCallGroupDisplay = (0, import_react152.useMemo)(
484030
+ const pendingToolCallGroupDisplay = (0, import_react153.useMemo)(
483984
484031
  () => toolCalls.length ? mapToDisplay(toolCalls) : void 0,
483985
484032
  [toolCalls]
483986
484033
  );
483987
- const activeToolPtyId = (0, import_react152.useMemo)(() => {
484034
+ const activeToolPtyId = (0, import_react153.useMemo)(() => {
483988
484035
  const executingShellTool = toolCalls?.find(
483989
484036
  (tc) => tc.status === "executing" && tc.request.name === "run_shell_command"
483990
484037
  );
@@ -483993,18 +484040,18 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
483993
484040
  }
483994
484041
  return void 0;
483995
484042
  }, [toolCalls]);
483996
- const loopDetectedRef = (0, import_react152.useRef)(false);
484043
+ const loopDetectedRef = (0, import_react153.useRef)(false);
483997
484044
  const [
483998
484045
  loopDetectionConfirmationRequest,
483999
484046
  setLoopDetectionConfirmationRequest
484000
- ] = (0, import_react152.useState)(null);
484001
- const stopRetryCountdownTimer = (0, import_react152.useCallback)(() => {
484047
+ ] = (0, import_react153.useState)(null);
484048
+ const stopRetryCountdownTimer = (0, import_react153.useCallback)(() => {
484002
484049
  if (retryCountdownTimerRef.current) {
484003
484050
  clearInterval(retryCountdownTimerRef.current);
484004
484051
  retryCountdownTimerRef.current = null;
484005
484052
  }
484006
484053
  }, []);
484007
- const clearRetryCountdown = (0, import_react152.useCallback)(() => {
484054
+ const clearRetryCountdown = (0, import_react153.useCallback)(() => {
484008
484055
  stopRetryCountdownTimer();
484009
484056
  setPendingRetryErrorItem(null);
484010
484057
  setPendingRetryCountdownItem(null);
@@ -484013,7 +484060,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484013
484060
  setPendingRetryCountdownItem,
484014
484061
  stopRetryCountdownTimer
484015
484062
  ]);
484016
- const startRetryCountdown = (0, import_react152.useCallback)(
484063
+ const startRetryCountdown = (0, import_react153.useCallback)(
484017
484064
  (retryInfo) => {
484018
484065
  stopRetryCountdownTimer();
484019
484066
  const startTime = Date.now();
@@ -484053,8 +484100,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484053
484100
  stopRetryCountdownTimer
484054
484101
  ]
484055
484102
  );
484056
- (0, import_react152.useEffect)(() => () => stopRetryCountdownTimer(), [stopRetryCountdownTimer]);
484057
- const onExec = (0, import_react152.useCallback)(async (done) => {
484103
+ (0, import_react153.useEffect)(() => () => stopRetryCountdownTimer(), [stopRetryCountdownTimer]);
484104
+ const onExec = (0, import_react153.useCallback)(async (done) => {
484058
484105
  setIsResponding(true);
484059
484106
  await done;
484060
484107
  setIsResponding(false);
@@ -484071,12 +484118,12 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484071
484118
  terminalHeight
484072
484119
  );
484073
484120
  const activePtyId = activeShellPtyId || activeToolPtyId;
484074
- (0, import_react152.useEffect)(() => {
484121
+ (0, import_react153.useEffect)(() => {
484075
484122
  if (!activePtyId) {
484076
484123
  setShellInputFocused(false);
484077
484124
  }
484078
484125
  }, [activePtyId, setShellInputFocused]);
484079
- const streamingState = (0, import_react152.useMemo)(() => {
484126
+ const streamingState = (0, import_react153.useMemo)(() => {
484080
484127
  if (toolCalls.some((tc) => tc.status === "awaiting_approval")) {
484081
484128
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
484082
484129
  }
@@ -484097,7 +484144,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484097
484144
  }
484098
484145
  return "idle" /* Idle */;
484099
484146
  }, [isResponding, toolCalls, isBackgrounded]);
484100
- (0, import_react152.useEffect)(() => {
484147
+ (0, import_react153.useEffect)(() => {
484101
484148
  if (config2.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
484102
484149
  const lastUserMessageIndex = history.findLastIndex(
484103
484150
  (item) => item.type === "user" /* USER */
@@ -484111,7 +484158,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484111
484158
  }
484112
484159
  }
484113
484160
  }, [streamingState, config2, history]);
484114
- const cancelOngoingRequest = (0, import_react152.useCallback)(() => {
484161
+ const cancelOngoingRequest = (0, import_react153.useCallback)(() => {
484115
484162
  if (streamingState !== "responding" /* Responding */ && streamingState !== "backgrounded" /* Backgrounded */) {
484116
484163
  return;
484117
484164
  }
@@ -484178,7 +484225,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484178
484225
  config2,
484179
484226
  getPromptCount
484180
484227
  ]);
484181
- const backgroundCurrentSession = (0, import_react152.useCallback)(() => {
484228
+ const backgroundCurrentSession = (0, import_react153.useCallback)(() => {
484182
484229
  if (streamingState !== "responding" /* Responding */) return;
484183
484230
  if (pendingHistoryItemRef.current) {
484184
484231
  addItem(pendingHistoryItemRef.current, Date.now());
@@ -484196,7 +484243,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484196
484243
  Date.now()
484197
484244
  );
484198
484245
  }, [streamingState, pendingHistoryItemRef, addItem, setPendingHistoryItem]);
484199
- const prepareQueryForGemini = (0, import_react152.useCallback)(
484246
+ const prepareQueryForGemini = (0, import_react153.useCallback)(
484200
484247
  async (query, userMessageTimestamp, abortSignal, prompt_id) => {
484201
484248
  if (turnCancelledRef.current) {
484202
484249
  return { queryToSend: null, shouldProceed: false };
@@ -484286,7 +484333,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484286
484333
  scheduleToolCalls
484287
484334
  ]
484288
484335
  );
484289
- const handleContentEvent = (0, import_react152.useCallback)(
484336
+ const handleContentEvent = (0, import_react153.useCallback)(
484290
484337
  (eventValue, currentGeminiMessageBuffer, userMessageTimestamp) => {
484291
484338
  if (turnCancelledRef.current) {
484292
484339
  return "";
@@ -484326,7 +484373,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484326
484373
  },
484327
484374
  [addItem, pendingHistoryItemRef, setPendingHistoryItem]
484328
484375
  );
484329
- const mergeThought = (0, import_react152.useCallback)(
484376
+ const mergeThought = (0, import_react153.useCallback)(
484330
484377
  (incoming) => {
484331
484378
  setThought((prev) => {
484332
484379
  if (!prev) {
@@ -484339,7 +484386,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484339
484386
  },
484340
484387
  [setThought]
484341
484388
  );
484342
- const handleThoughtEvent = (0, import_react152.useCallback)(
484389
+ const handleThoughtEvent = (0, import_react153.useCallback)(
484343
484390
  (eventValue, currentThoughtBuffer, userMessageTimestamp) => {
484344
484391
  if (turnCancelledRef.current) {
484345
484392
  return "";
@@ -484388,7 +484435,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484388
484435
  },
484389
484436
  [addItem, pendingHistoryItemRef, setPendingHistoryItem, mergeThought]
484390
484437
  );
484391
- const handleUserCancelledEvent = (0, import_react152.useCallback)(
484438
+ const handleUserCancelledEvent = (0, import_react153.useCallback)(
484392
484439
  (userMessageTimestamp) => {
484393
484440
  if (turnCancelledRef.current) {
484394
484441
  return;
@@ -484425,7 +484472,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484425
484472
  clearRetryCountdown
484426
484473
  ]
484427
484474
  );
484428
- const handleErrorEvent = (0, import_react152.useCallback)(
484475
+ const handleErrorEvent = (0, import_react153.useCallback)(
484429
484476
  (eventValue, userMessageTimestamp) => {
484430
484477
  lastPromptErroredRef.current = true;
484431
484478
  if (pendingHistoryItemRef.current) {
@@ -484457,7 +484504,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484457
484504
  clearRetryCountdown
484458
484505
  ]
484459
484506
  );
484460
- const handleCitationEvent = (0, import_react152.useCallback)(
484507
+ const handleCitationEvent = (0, import_react153.useCallback)(
484461
484508
  (text, userMessageTimestamp) => {
484462
484509
  if (!showCitations(settings2)) {
484463
484510
  return;
@@ -484470,7 +484517,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484470
484517
  },
484471
484518
  [addItem, pendingHistoryItemRef, setPendingHistoryItem, settings2]
484472
484519
  );
484473
- const handleFinishedEvent = (0, import_react152.useCallback)(
484520
+ const handleFinishedEvent = (0, import_react153.useCallback)(
484474
484521
  (event, userMessageTimestamp) => {
484475
484522
  const finishReason = event.value.reason;
484476
484523
  if (!finishReason) {
@@ -484509,7 +484556,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484509
484556
  },
484510
484557
  [addItem, clearRetryCountdown]
484511
484558
  );
484512
- const handleChatCompressionEvent = (0, import_react152.useCallback)(
484559
+ const handleChatCompressionEvent = (0, import_react153.useCallback)(
484513
484560
  (eventValue, userMessageTimestamp) => {
484514
484561
  if (pendingHistoryItemRef.current) {
484515
484562
  addItem(pendingHistoryItemRef.current, userMessageTimestamp);
@@ -484525,7 +484572,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484525
484572
  },
484526
484573
  [addItem, config2, pendingHistoryItemRef, setPendingHistoryItem]
484527
484574
  );
484528
- const handleMaxSessionTurnsEvent = (0, import_react152.useCallback)(
484575
+ const handleMaxSessionTurnsEvent = (0, import_react153.useCallback)(
484529
484576
  () => addItem(
484530
484577
  {
484531
484578
  type: "info",
@@ -484535,7 +484582,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484535
484582
  ),
484536
484583
  [addItem, config2]
484537
484584
  );
484538
- const handleSessionTokenLimitExceededEvent = (0, import_react152.useCallback)(
484585
+ const handleSessionTokenLimitExceededEvent = (0, import_react153.useCallback)(
484539
484586
  (value) => addItem(
484540
484587
  {
484541
484588
  type: "error",
@@ -484550,7 +484597,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484550
484597
  ),
484551
484598
  [addItem]
484552
484599
  );
484553
- const handleLoopDetectionConfirmation = (0, import_react152.useCallback)(
484600
+ const handleLoopDetectionConfirmation = (0, import_react153.useCallback)(
484554
484601
  (result) => {
484555
484602
  setLoopDetectionConfirmationRequest(null);
484556
484603
  if (result.userSelection === "disable") {
@@ -484574,12 +484621,12 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484574
484621
  },
484575
484622
  [config2, addItem]
484576
484623
  );
484577
- const handleLoopDetectedEvent = (0, import_react152.useCallback)(() => {
484624
+ const handleLoopDetectedEvent = (0, import_react153.useCallback)(() => {
484578
484625
  setLoopDetectionConfirmationRequest({
484579
484626
  onComplete: handleLoopDetectionConfirmation
484580
484627
  });
484581
484628
  }, [handleLoopDetectionConfirmation]);
484582
- const processGeminiStreamEvents = (0, import_react152.useCallback)(
484629
+ const processGeminiStreamEvents = (0, import_react153.useCallback)(
484583
484630
  async (stream2, userMessageTimestamp, signal) => {
484584
484631
  let geminiMessageBuffer = "";
484585
484632
  let thoughtBuffer = "";
@@ -484760,7 +484807,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484760
484807
  setPendingHistoryItem
484761
484808
  ]
484762
484809
  );
484763
- const submitQuery = (0, import_react152.useCallback)(
484810
+ const submitQuery = (0, import_react153.useCallback)(
484764
484811
  async (query, submitType = SendMessageType.UserQuery, prompt_id) => {
484765
484812
  const allowConcurrentBtwDuringResponse = submitType === SendMessageType.UserQuery && streamingState === "responding" /* Responding */ && typeof query === "string" && isBtwCommand(query);
484766
484813
  const bypassGuard = submitType === SendMessageType.ToolResult || allowConcurrentBtwDuringResponse;
@@ -484998,7 +485045,7 @@ ${preview}`
484998
485045
  setPendingRetryErrorItem
484999
485046
  ]
485000
485047
  );
485001
- const retryLastPrompt = (0, import_react152.useCallback)(async () => {
485048
+ const retryLastPrompt = (0, import_react153.useCallback)(async () => {
485002
485049
  if (streamingState === "responding" /* Responding */ || streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ || streamingState === "backgrounded" /* Backgrounded */) {
485003
485050
  return;
485004
485051
  }
@@ -485016,7 +485063,7 @@ ${preview}`
485016
485063
  clearRetryCountdown();
485017
485064
  await submitQuery(lastPrompt, SendMessageType.Retry);
485018
485065
  }, [streamingState, addItem, clearRetryCountdown, submitQuery]);
485019
- const handleApprovalModeChange = (0, import_react152.useCallback)(
485066
+ const handleApprovalModeChange = (0, import_react153.useCallback)(
485020
485067
  async (newApprovalMode) => {
485021
485068
  if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
485022
485069
  let awaitingApprovalCalls = toolCalls.filter(
@@ -485045,7 +485092,7 @@ ${preview}`
485045
485092
  },
485046
485093
  [toolCalls]
485047
485094
  );
485048
- const handleCompletedTools = (0, import_react152.useCallback)(
485095
+ const handleCompletedTools = (0, import_react153.useCallback)(
485049
485096
  async (completedToolCallsFromScheduler) => {
485050
485097
  if (isResponding) {
485051
485098
  pendingCompletedToolsRef.current.push(
@@ -485195,13 +485242,13 @@ ${verifyResult}` });
485195
485242
  ]
485196
485243
  );
485197
485244
  onCompleteFnRef.current = handleCompletedTools;
485198
- (0, import_react152.useEffect)(() => {
485245
+ (0, import_react153.useEffect)(() => {
485199
485246
  if (!isResponding && pendingCompletedToolsRef.current.length > 0) {
485200
485247
  const queued = pendingCompletedToolsRef.current.splice(0);
485201
485248
  void handleCompletedTools(queued);
485202
485249
  }
485203
485250
  }, [isResponding, handleCompletedTools]);
485204
- const pendingHistoryItems = (0, import_react152.useMemo)(
485251
+ const pendingHistoryItems = (0, import_react153.useMemo)(
485205
485252
  () => [
485206
485253
  pendingHistoryItem,
485207
485254
  pendingRetryErrorItem,
@@ -485215,7 +485262,7 @@ ${verifyResult}` });
485215
485262
  pendingToolCallGroupDisplay
485216
485263
  ]
485217
485264
  );
485218
- (0, import_react152.useEffect)(() => {
485265
+ (0, import_react153.useEffect)(() => {
485219
485266
  const saveRestorableToolCalls = /* @__PURE__ */ __name(async () => {
485220
485267
  if (!config2.getCheckpointingEnabled()) {
485221
485268
  return;
@@ -485318,9 +485365,9 @@ ${verifyResult}` });
485318
485365
  geminiClient,
485319
485366
  storage
485320
485367
  ]);
485321
- const cronQueueRef = (0, import_react152.useRef)([]);
485322
- const [cronTrigger, setCronTrigger] = (0, import_react152.useState)(0);
485323
- (0, import_react152.useEffect)(() => {
485368
+ const cronQueueRef = (0, import_react153.useRef)([]);
485369
+ const [cronTrigger, setCronTrigger] = (0, import_react153.useState)(0);
485370
+ (0, import_react153.useEffect)(() => {
485324
485371
  if (!config2.isCronEnabled()) return;
485325
485372
  const scheduler = config2.getCronScheduler();
485326
485373
  scheduler.start((job) => {
@@ -485335,13 +485382,13 @@ ${verifyResult}` });
485335
485382
  }
485336
485383
  };
485337
485384
  }, [config2]);
485338
- (0, import_react152.useEffect)(() => {
485385
+ (0, import_react153.useEffect)(() => {
485339
485386
  if (streamingState === "idle" /* Idle */ && cronQueueRef.current.length > 0) {
485340
485387
  const prompt = cronQueueRef.current.shift();
485341
485388
  submitQuery(prompt, SendMessageType.Cron);
485342
485389
  }
485343
485390
  }, [streamingState, submitQuery, cronTrigger]);
485344
- (0, import_react152.useEffect)(() => {
485391
+ (0, import_react153.useEffect)(() => {
485345
485392
  Promise.resolve().then(() => (init_dist4(), dist_exports)).then((core) => {
485346
485393
  core.initTimedMicrocompact?.();
485347
485394
  }).catch(() => {
@@ -485365,7 +485412,7 @@ ${verifyResult}` });
485365
485412
 
485366
485413
  // packages/cli/src/ui/hooks/vim.ts
485367
485414
  init_esbuild_shims();
485368
- var import_react153 = __toESM(require_react(), 1);
485415
+ var import_react154 = __toESM(require_react(), 1);
485369
485416
  init_dist4();
485370
485417
  var DIGIT_MULTIPLIER = 10;
485371
485418
  var DEFAULT_COUNT = 1;
@@ -485430,22 +485477,22 @@ var vimReducer = /* @__PURE__ */ __name((state, action) => {
485430
485477
  }, "vimReducer");
485431
485478
  function useVim(buffer, onSubmit) {
485432
485479
  const { vimEnabled, vimMode, setVimMode } = useVimMode();
485433
- const [state, dispatch] = (0, import_react153.useReducer)(vimReducer, initialVimState);
485434
- (0, import_react153.useEffect)(() => {
485480
+ const [state, dispatch] = (0, import_react154.useReducer)(vimReducer, initialVimState);
485481
+ (0, import_react154.useEffect)(() => {
485435
485482
  dispatch({ type: "SET_MODE", mode: vimMode });
485436
485483
  }, [vimMode]);
485437
- const updateMode = (0, import_react153.useCallback)(
485484
+ const updateMode = (0, import_react154.useCallback)(
485438
485485
  (mode) => {
485439
485486
  setVimMode(mode);
485440
485487
  dispatch({ type: "SET_MODE", mode });
485441
485488
  },
485442
485489
  [setVimMode]
485443
485490
  );
485444
- const getCurrentCount = (0, import_react153.useCallback)(
485491
+ const getCurrentCount = (0, import_react154.useCallback)(
485445
485492
  () => state.count || DEFAULT_COUNT,
485446
485493
  [state.count]
485447
485494
  );
485448
- const executeCommand = (0, import_react153.useCallback)(
485495
+ const executeCommand = (0, import_react154.useCallback)(
485449
485496
  (cmdType, count) => {
485450
485497
  switch (cmdType) {
485451
485498
  case CMD_TYPES.DELETE_WORD_FORWARD: {
@@ -485521,7 +485568,7 @@ function useVim(buffer, onSubmit) {
485521
485568
  },
485522
485569
  [buffer, updateMode]
485523
485570
  );
485524
- const handleInsertModeInput = (0, import_react153.useCallback)(
485571
+ const handleInsertModeInput = (0, import_react154.useCallback)(
485525
485572
  (normalizedKey) => {
485526
485573
  if (normalizedKey.name === "escape") {
485527
485574
  buffer.vimEscapeInsertMode();
@@ -485552,7 +485599,7 @@ function useVim(buffer, onSubmit) {
485552
485599
  },
485553
485600
  [buffer, dispatch, updateMode, onSubmit]
485554
485601
  );
485555
- const normalizeKey = (0, import_react153.useCallback)(
485602
+ const normalizeKey = (0, import_react154.useCallback)(
485556
485603
  (key) => ({
485557
485604
  name: key.name || "",
485558
485605
  sequence: key.sequence || "",
@@ -485563,7 +485610,7 @@ function useVim(buffer, onSubmit) {
485563
485610
  }),
485564
485611
  []
485565
485612
  );
485566
- const handleChangeMovement = (0, import_react153.useCallback)(
485613
+ const handleChangeMovement = (0, import_react154.useCallback)(
485567
485614
  (movement) => {
485568
485615
  const count = getCurrentCount();
485569
485616
  dispatch({ type: "CLEAR_COUNT" });
@@ -485584,7 +485631,7 @@ function useVim(buffer, onSubmit) {
485584
485631
  },
485585
485632
  [getCurrentCount, dispatch, buffer, updateMode]
485586
485633
  );
485587
- const handleOperatorMotion = (0, import_react153.useCallback)(
485634
+ const handleOperatorMotion = (0, import_react154.useCallback)(
485588
485635
  (operator2, motion) => {
485589
485636
  const count = getCurrentCount();
485590
485637
  const commandMap = {
@@ -485611,7 +485658,7 @@ function useVim(buffer, onSubmit) {
485611
485658
  },
485612
485659
  [getCurrentCount, executeCommand, dispatch]
485613
485660
  );
485614
- const handleInput = (0, import_react153.useCallback)(
485661
+ const handleInput = (0, import_react154.useCallback)(
485615
485662
  (key) => {
485616
485663
  if (!vimEnabled) {
485617
485664
  return false;
@@ -485911,7 +485958,7 @@ __name(useVim, "useVim");
485911
485958
 
485912
485959
  // packages/cli/src/ui/hooks/useAwaySummary.ts
485913
485960
  init_esbuild_shims();
485914
- var import_react154 = __toESM(require_react(), 1);
485961
+ var import_react155 = __toESM(require_react(), 1);
485915
485962
  init_dist4();
485916
485963
  var DEFAULT_AWAY_THRESHOLD_MINUTES = 5;
485917
485964
  var MIN_USER_MESSAGES_TO_FIRE = 3;
@@ -485943,15 +485990,15 @@ function useAwaySummary(options2) {
485943
485990
  history,
485944
485991
  awayThresholdMinutes
485945
485992
  } = options2;
485946
- const blurredAtRef = (0, import_react154.useRef)(null);
485947
- const recapPendingRef = (0, import_react154.useRef)(false);
485948
- const inFlightRef = (0, import_react154.useRef)(null);
485949
- const isIdleRef = (0, import_react154.useRef)(isIdle);
485993
+ const blurredAtRef = (0, import_react155.useRef)(null);
485994
+ const recapPendingRef = (0, import_react155.useRef)(false);
485995
+ const inFlightRef = (0, import_react155.useRef)(null);
485996
+ const isIdleRef = (0, import_react155.useRef)(isIdle);
485950
485997
  isIdleRef.current = isIdle;
485951
- const historyRef = (0, import_react154.useRef)(history);
485998
+ const historyRef = (0, import_react155.useRef)(history);
485952
485999
  historyRef.current = history;
485953
486000
  const thresholdMs = (awayThresholdMinutes && awayThresholdMinutes > 0 ? awayThresholdMinutes : DEFAULT_AWAY_THRESHOLD_MINUTES) * 60 * 1e3;
485954
- (0, import_react154.useEffect)(() => {
486001
+ (0, import_react155.useEffect)(() => {
485955
486002
  if (!enabled || !config2) {
485956
486003
  inFlightRef.current?.abort();
485957
486004
  inFlightRef.current = null;
@@ -486003,7 +486050,7 @@ function useAwaySummary(options2) {
486003
486050
  recapPendingRef.current = false;
486004
486051
  });
486005
486052
  }, [enabled, config2, isFocused, isIdle, addItem, thresholdMs]);
486006
- (0, import_react154.useEffect)(
486053
+ (0, import_react155.useEffect)(
486007
486054
  () => () => {
486008
486055
  inFlightRef.current?.abort();
486009
486056
  },
@@ -486014,14 +486061,14 @@ __name(useAwaySummary, "useAwaySummary");
486014
486061
 
486015
486062
  // packages/cli/src/ui/hooks/useBracketedPaste.ts
486016
486063
  init_esbuild_shims();
486017
- var import_react155 = __toESM(require_react(), 1);
486064
+ var import_react156 = __toESM(require_react(), 1);
486018
486065
  var ENABLE_BRACKETED_PASTE = "\x1B[?2004h";
486019
486066
  var DISABLE_BRACKETED_PASTE = "\x1B[?2004l";
486020
486067
  var useBracketedPaste = /* @__PURE__ */ __name(() => {
486021
486068
  const cleanup = /* @__PURE__ */ __name(() => {
486022
486069
  process.stdout.write(DISABLE_BRACKETED_PASTE);
486023
486070
  }, "cleanup");
486024
- (0, import_react155.useEffect)(() => {
486071
+ (0, import_react156.useEffect)(() => {
486025
486072
  process.stdout.write(`\x1B[?2026h${ENABLE_BRACKETED_PASTE}\x1B[?2026l`);
486026
486073
  process.on("exit", cleanup);
486027
486074
  process.on("SIGINT", cleanup);
@@ -486037,7 +486084,7 @@ var useBracketedPaste = /* @__PURE__ */ __name(() => {
486037
486084
 
486038
486085
  // packages/cli/src/ui/hooks/useKeyboardHandling.ts
486039
486086
  init_esbuild_shims();
486040
- var import_react156 = __toESM(require_react(), 1);
486087
+ var import_react157 = __toESM(require_react(), 1);
486041
486088
  init_dist4();
486042
486089
  var CTRL_EXIT_PROMPT_DURATION_MS = 1e3;
486043
486090
  function useKeyboardHandling(params) {
@@ -486060,20 +486107,20 @@ function useKeyboardHandling(params) {
486060
486107
  debugKeystrokeLogging,
486061
486108
  onBackgroundSession
486062
486109
  } = params;
486063
- const [showToolDescriptions, setShowToolDescriptions] = (0, import_react156.useState)(false);
486064
- const [ctrlCPressedOnce, setCtrlCPressedOnce] = (0, import_react156.useState)(false);
486065
- const ctrlCTimerRef = (0, import_react156.useRef)(null);
486066
- const [ctrlDPressedOnce, setCtrlDPressedOnce] = (0, import_react156.useState)(false);
486067
- const ctrlDTimerRef = (0, import_react156.useRef)(null);
486068
- const [escapePressedOnce, setEscapePressedOnce] = (0, import_react156.useState)(false);
486069
- const escapeTimerRef = (0, import_react156.useRef)(null);
486070
- const dialogsVisibleRef = (0, import_react156.useRef)(false);
486071
- const [constrainHeight, setConstrainHeight] = (0, import_react156.useState)(true);
486072
- const [showEscapePrompt, setShowEscapePrompt] = (0, import_react156.useState)(false);
486073
- const handleEscapePromptChange = (0, import_react156.useCallback)((showPrompt) => {
486110
+ const [showToolDescriptions, setShowToolDescriptions] = (0, import_react157.useState)(false);
486111
+ const [ctrlCPressedOnce, setCtrlCPressedOnce] = (0, import_react157.useState)(false);
486112
+ const ctrlCTimerRef = (0, import_react157.useRef)(null);
486113
+ const [ctrlDPressedOnce, setCtrlDPressedOnce] = (0, import_react157.useState)(false);
486114
+ const ctrlDTimerRef = (0, import_react157.useRef)(null);
486115
+ const [escapePressedOnce, setEscapePressedOnce] = (0, import_react157.useState)(false);
486116
+ const escapeTimerRef = (0, import_react157.useRef)(null);
486117
+ const dialogsVisibleRef = (0, import_react157.useRef)(false);
486118
+ const [constrainHeight, setConstrainHeight] = (0, import_react157.useState)(true);
486119
+ const [showEscapePrompt, setShowEscapePrompt] = (0, import_react157.useState)(false);
486120
+ const handleEscapePromptChange = (0, import_react157.useCallback)((showPrompt) => {
486074
486121
  setShowEscapePrompt(showPrompt);
486075
486122
  }, []);
486076
- const globalKeypressHandlerRef = (0, import_react156.useRef)(() => {
486123
+ const globalKeypressHandlerRef = (0, import_react157.useRef)(() => {
486077
486124
  });
486078
486125
  globalKeypressHandlerRef.current = (key) => {
486079
486126
  if (debugKeystrokeLogging) {
@@ -486183,7 +486230,7 @@ function useKeyboardHandling(params) {
486183
486230
  return;
486184
486231
  }
486185
486232
  };
486186
- const handleGlobalKeypress = (0, import_react156.useCallback)(
486233
+ const handleGlobalKeypress = (0, import_react157.useCallback)(
486187
486234
  (key) => globalKeypressHandlerRef.current(key),
486188
486235
  []
486189
486236
  );
@@ -486208,22 +486255,22 @@ init_esbuild_shims();
486208
486255
 
486209
486256
  // packages/cli/src/ui/hooks/usePhraseCycler.ts
486210
486257
  init_esbuild_shims();
486211
- var import_react157 = __toESM(require_react(), 1);
486258
+ var import_react158 = __toESM(require_react(), 1);
486212
486259
  var WITTY_LOADING_PHRASES = ["I'm Feeling Lucky"];
486213
486260
  var PHRASE_CHANGE_INTERVAL_MS = 15e3;
486214
486261
  var usePhraseCycler = /* @__PURE__ */ __name((isActive, isWaiting, customPhrases) => {
486215
- const loadingPhrases = (0, import_react157.useMemo)(() => {
486262
+ const loadingPhrases = (0, import_react158.useMemo)(() => {
486216
486263
  if (customPhrases && customPhrases.length > 0) {
486217
486264
  return customPhrases;
486218
486265
  }
486219
486266
  const translatedPhrases = ta("WITTY_LOADING_PHRASES");
486220
486267
  return translatedPhrases.length > 0 ? translatedPhrases : WITTY_LOADING_PHRASES;
486221
486268
  }, [customPhrases]);
486222
- const [currentLoadingPhrase, setCurrentLoadingPhrase] = (0, import_react157.useState)(
486269
+ const [currentLoadingPhrase, setCurrentLoadingPhrase] = (0, import_react158.useState)(
486223
486270
  loadingPhrases[0]
486224
486271
  );
486225
- const phraseIntervalRef = (0, import_react157.useRef)(null);
486226
- (0, import_react157.useEffect)(() => {
486272
+ const phraseIntervalRef = (0, import_react158.useRef)(null);
486273
+ (0, import_react158.useEffect)(() => {
486227
486274
  if (isWaiting) {
486228
486275
  setCurrentLoadingPhrase(t4("Waiting for user confirmation..."));
486229
486276
  if (phraseIntervalRef.current) {
@@ -486260,9 +486307,9 @@ var usePhraseCycler = /* @__PURE__ */ __name((isActive, isWaiting, customPhrases
486260
486307
  }, "usePhraseCycler");
486261
486308
 
486262
486309
  // packages/cli/src/ui/hooks/useLoadingIndicator.ts
486263
- var import_react158 = __toESM(require_react(), 1);
486310
+ var import_react159 = __toESM(require_react(), 1);
486264
486311
  var useLoadingIndicator = /* @__PURE__ */ __name((streamingState, customWittyPhrases, currentCandidatesTokens) => {
486265
- const [timerResetKey, setTimerResetKey] = (0, import_react158.useState)(0);
486312
+ const [timerResetKey, setTimerResetKey] = (0, import_react159.useState)(0);
486266
486313
  const isTimerActive = streamingState === "responding" /* Responding */;
486267
486314
  const elapsedTimeFromTimer = useTimer(isTimerActive, timerResetKey);
486268
486315
  const isPhraseCyclingActive = streamingState === "responding" /* Responding */;
@@ -486272,10 +486319,10 @@ var useLoadingIndicator = /* @__PURE__ */ __name((streamingState, customWittyPhr
486272
486319
  isWaiting,
486273
486320
  customWittyPhrases
486274
486321
  );
486275
- const [retainedElapsedTime, setRetainedElapsedTime] = (0, import_react158.useState)(0);
486276
- const [taskStartTokens, setTaskStartTokens] = (0, import_react158.useState)(0);
486277
- const prevStreamingStateRef = (0, import_react158.useRef)(null);
486278
- (0, import_react158.useEffect)(() => {
486322
+ const [retainedElapsedTime, setRetainedElapsedTime] = (0, import_react159.useState)(0);
486323
+ const [taskStartTokens, setTaskStartTokens] = (0, import_react159.useState)(0);
486324
+ const prevStreamingStateRef = (0, import_react159.useRef)(null);
486325
+ (0, import_react159.useEffect)(() => {
486279
486326
  if (prevStreamingStateRef.current === "waiting_for_confirmation" /* WaitingForConfirmation */ && streamingState === "responding" /* Responding */) {
486280
486327
  setTimerResetKey((prevKey) => prevKey + 1);
486281
486328
  setRetainedElapsedTime(0);
@@ -486300,20 +486347,20 @@ var useLoadingIndicator = /* @__PURE__ */ __name((streamingState, customWittyPhr
486300
486347
 
486301
486348
  // packages/cli/src/ui/hooks/useFolderTrust.ts
486302
486349
  init_esbuild_shims();
486303
- var import_react159 = __toESM(require_react(), 1);
486350
+ var import_react160 = __toESM(require_react(), 1);
486304
486351
  import * as process38 from "node:process";
486305
486352
  var useFolderTrust = /* @__PURE__ */ __name((settings2, onTrustChange) => {
486306
- const [isTrusted, setIsTrusted] = (0, import_react159.useState)(void 0);
486307
- const [isFolderTrustDialogOpen, setIsFolderTrustDialogOpen] = (0, import_react159.useState)(false);
486308
- const [isRestarting, setIsRestarting] = (0, import_react159.useState)(false);
486353
+ const [isTrusted, setIsTrusted] = (0, import_react160.useState)(void 0);
486354
+ const [isFolderTrustDialogOpen, setIsFolderTrustDialogOpen] = (0, import_react160.useState)(false);
486355
+ const [isRestarting, setIsRestarting] = (0, import_react160.useState)(false);
486309
486356
  const folderTrust = settings2.merged.security?.folderTrust?.enabled;
486310
- (0, import_react159.useEffect)(() => {
486357
+ (0, import_react160.useEffect)(() => {
486311
486358
  const { isTrusted: trusted } = isWorkspaceTrusted(settings2.merged);
486312
486359
  setIsTrusted(trusted);
486313
486360
  setIsFolderTrustDialogOpen(trusted === void 0);
486314
486361
  onTrustChange(trusted);
486315
486362
  }, [folderTrust, onTrustChange, settings2.merged]);
486316
- const handleFolderTrustSelect = (0, import_react159.useCallback)(
486363
+ const handleFolderTrustSelect = (0, import_react160.useCallback)(
486317
486364
  (choice2) => {
486318
486365
  const trustedFolders = loadTrustedFolders();
486319
486366
  const cwd6 = process38.cwd();
@@ -486356,7 +486403,7 @@ var useFolderTrust = /* @__PURE__ */ __name((settings2, onTrustChange) => {
486356
486403
 
486357
486404
  // packages/cli/src/ui/hooks/useCommandMigration.ts
486358
486405
  init_esbuild_shims();
486359
- var import_react160 = __toESM(require_react(), 1);
486406
+ var import_react161 = __toESM(require_react(), 1);
486360
486407
  init_dist4();
486361
486408
 
486362
486409
  // packages/cli/src/services/command-migration-tool.ts
@@ -486430,9 +486477,9 @@ __name(migrateTomlCommands, "migrateTomlCommands");
486430
486477
 
486431
486478
  // packages/cli/src/ui/hooks/useCommandMigration.ts
486432
486479
  function useCommandMigration(settings2, storage) {
486433
- const [showMigrationNudge, setShowMigrationNudge] = (0, import_react160.useState)(false);
486434
- const [tomlFiles, setTomlFiles] = (0, import_react160.useState)([]);
486435
- (0, import_react160.useEffect)(() => {
486480
+ const [showMigrationNudge, setShowMigrationNudge] = (0, import_react161.useState)(false);
486481
+ const [tomlFiles, setTomlFiles] = (0, import_react161.useState)([]);
486482
+ (0, import_react161.useEffect)(() => {
486436
486483
  const checkTomlCommands = /* @__PURE__ */ __name(async () => {
486437
486484
  const allFiles = [];
486438
486485
  const workspaceCommandsDir = storage.getProjectCommandsDir();
@@ -486458,9 +486505,9 @@ __name(useCommandMigration, "useCommandMigration");
486458
486505
 
486459
486506
  // packages/cli/src/ui/hooks/useIdleMessageDrain.ts
486460
486507
  init_esbuild_shims();
486461
- var import_react161 = __toESM(require_react(), 1);
486508
+ var import_react162 = __toESM(require_react(), 1);
486462
486509
  function useIdleMessageDrain(isConfigInitialized, streamingState, messageQueue, drain, submitQuery) {
486463
- (0, import_react161.useEffect)(() => {
486510
+ (0, import_react162.useEffect)(() => {
486464
486511
  if (isConfigInitialized && streamingState === "idle" /* Idle */ && messageQueue.length > 0) {
486465
486512
  const combined = messageQueue.join("\n\n");
486466
486513
  drain();
@@ -486472,7 +486519,7 @@ __name(useIdleMessageDrain, "useIdleMessageDrain");
486472
486519
 
486473
486520
  // packages/cli/src/ui/hooks/useWindowTitle.ts
486474
486521
  init_esbuild_shims();
486475
- var import_react162 = __toESM(require_react(), 1);
486522
+ var import_react163 = __toESM(require_react(), 1);
486476
486523
  import { basename as basename31 } from "node:path";
486477
486524
 
486478
486525
  // packages/cli/src/utils/windowTitle.ts
@@ -486489,9 +486536,9 @@ __name(computeWindowTitle, "computeWindowTitle");
486489
486536
 
486490
486537
  // packages/cli/src/ui/hooks/useWindowTitle.ts
486491
486538
  function useWindowTitle(streamingState, thought, settings2, stdout3, targetDir) {
486492
- const originalTitleRef = (0, import_react162.useRef)(computeWindowTitle(basename31(targetDir)));
486493
- const lastTitleRef = (0, import_react162.useRef)(null);
486494
- (0, import_react162.useEffect)(() => {
486539
+ const originalTitleRef = (0, import_react163.useRef)(computeWindowTitle(basename31(targetDir)));
486540
+ const lastTitleRef = (0, import_react163.useRef)(null);
486541
+ (0, import_react163.useEffect)(() => {
486495
486542
  if (!settings2.merged.ui?.showStatusInTitle || settings2.merged.ui?.hideWindowTitle)
486496
486543
  return;
486497
486544
  let title;
@@ -486518,11 +486565,11 @@ __name(useWindowTitle, "useWindowTitle");
486518
486565
 
486519
486566
  // packages/cli/src/ui/hooks/useInitializationEffects.ts
486520
486567
  init_esbuild_shims();
486521
- var import_react163 = __toESM(require_react(), 1);
486568
+ var import_react164 = __toESM(require_react(), 1);
486522
486569
  init_dist4();
486523
486570
  var debugLogger159 = createDebugLogger("APP_CONTAINER");
486524
486571
  function useInitializationEffects(config2, historyManager, setConfigInitialized, setSessionName) {
486525
- (0, import_react163.useEffect)(() => {
486572
+ (0, import_react164.useEffect)(() => {
486526
486573
  (async () => {
486527
486574
  await config2.initialize();
486528
486575
  setConfigInitialized(true);
@@ -486596,7 +486643,7 @@ __name(useInitializationEffects, "useInitializationEffects");
486596
486643
 
486597
486644
  // packages/cli/src/ui/hooks/usePromptSuggestions.ts
486598
486645
  init_esbuild_shims();
486599
- var import_react164 = __toESM(require_react(), 1);
486646
+ var import_react165 = __toESM(require_react(), 1);
486600
486647
  init_dist4();
486601
486648
  function usePromptSuggestions(params) {
486602
486649
  const {
@@ -486612,17 +486659,17 @@ function usePromptSuggestions(params) {
486612
486659
  settingInputRequests,
486613
486660
  pendingGeminiHistoryItems
486614
486661
  } = params;
486615
- const [promptSuggestion, setPromptSuggestion] = (0, import_react164.useState)(null);
486616
- const prevStreamingStateRef = (0, import_react164.useRef)("idle" /* Idle */);
486617
- const speculationRef = (0, import_react164.useRef)(IDLE_SPECULATION);
486618
- const suggestionAbortRef = (0, import_react164.useRef)(null);
486619
- const dismissPromptSuggestion = (0, import_react164.useCallback)(() => {
486662
+ const [promptSuggestion, setPromptSuggestion] = (0, import_react165.useState)(null);
486663
+ const prevStreamingStateRef = (0, import_react165.useRef)("idle" /* Idle */);
486664
+ const speculationRef = (0, import_react165.useRef)(IDLE_SPECULATION);
486665
+ const suggestionAbortRef = (0, import_react165.useRef)(null);
486666
+ const dismissPromptSuggestion = (0, import_react165.useCallback)(() => {
486620
486667
  setPromptSuggestion(null);
486621
486668
  suggestionAbortRef.current?.abort();
486622
486669
  suggestionAbortRef.current = null;
486623
486670
  }, []);
486624
486671
  const followupSuggestionsEnabled = settings2.merged.ui?.enableFollowupSuggestions !== false;
486625
- (0, import_react164.useEffect)(() => {
486672
+ (0, import_react165.useEffect)(() => {
486626
486673
  if (!followupSuggestionsEnabled) {
486627
486674
  suggestionAbortRef.current?.abort();
486628
486675
  setPromptSuggestion(null);
@@ -486695,7 +486742,7 @@ function usePromptSuggestions(params) {
486695
486742
  isPermissionsDialogOpen,
486696
486743
  settingInputRequests
486697
486744
  ]);
486698
- (0, import_react164.useEffect)(() => {
486745
+ (0, import_react165.useEffect)(() => {
486699
486746
  if (!promptSuggestion && speculationRef.current.status !== "idle") {
486700
486747
  abortSpeculation(speculationRef.current).catch(() => {
486701
486748
  });
@@ -486713,7 +486760,7 @@ __name(usePromptSuggestions, "usePromptSuggestions");
486713
486760
 
486714
486761
  // packages/cli/src/ui/hooks/useExitHandling.ts
486715
486762
  init_esbuild_shims();
486716
- var import_react165 = __toESM(require_react(), 1);
486763
+ var import_react166 = __toESM(require_react(), 1);
486717
486764
  function useExitHandling(params) {
486718
486765
  const {
486719
486766
  isAuthDialogOpen,
@@ -486723,7 +486770,7 @@ function useExitHandling(params) {
486723
486770
  cancelOngoingRequest,
486724
486771
  buffer
486725
486772
  } = params;
486726
- const handleExit = (0, import_react165.useCallback)(
486773
+ const handleExit = (0, import_react166.useCallback)(
486727
486774
  (pressedOnce, setPressedOnce, timerRef) => {
486728
486775
  if (pressedOnce) {
486729
486776
  if (timerRef.current) {
@@ -486778,7 +486825,7 @@ init_esbuild_shims();
486778
486825
  init_esbuild_shims();
486779
486826
  import process47 from "node:process";
486780
486827
  import { spawn as spawn12 } from "node:child_process";
486781
- import { fileURLToPath as fileURLToPath18 } from "node:url";
486828
+ import { fileURLToPath as fileURLToPath17 } from "node:url";
486782
486829
  import path146 from "node:path";
486783
486830
  import { format as format3 } from "node:util";
486784
486831
 
@@ -488824,7 +488871,7 @@ var isNpmOrYarn = isNpm || isYarn;
488824
488871
  init_esbuild_shims();
488825
488872
  import fs132 from "node:fs";
488826
488873
  import path145 from "node:path";
488827
- import { fileURLToPath as fileURLToPath17 } from "node:url";
488874
+ import { fileURLToPath as fileURLToPath16 } from "node:url";
488828
488875
 
488829
488876
  // node_modules/global-directory/index.js
488830
488877
  init_esbuild_shims();
@@ -488931,7 +488978,7 @@ function isPathInside(childPath, parentPath) {
488931
488978
  __name(isPathInside, "isPathInside");
488932
488979
 
488933
488980
  // node_modules/is-installed-globally/index.js
488934
- var __dirname7 = path145.dirname(fileURLToPath17(import.meta.url));
488981
+ var __dirname7 = path145.dirname(fileURLToPath16(import.meta.url));
488935
488982
  var isInstalledGlobally = (() => {
488936
488983
  try {
488937
488984
  return isPathInside(__dirname7, global_directory_default.yarn.packages) || isPathInside(__dirname7, fs132.realpathSync(global_directory_default.npm.packages));
@@ -489429,7 +489476,7 @@ function pupa(template, data, { ignoreMissing = false, transform: transform2 = /
489429
489476
  __name(pupa, "pupa");
489430
489477
 
489431
489478
  // node_modules/update-notifier/update-notifier.js
489432
- var __dirname8 = path146.dirname(fileURLToPath18(import.meta.url));
489479
+ var __dirname8 = path146.dirname(fileURLToPath17(import.meta.url));
489433
489480
  var ONE_DAY = 1e3 * 60 * 60 * 24;
489434
489481
  var UpdateNotifier = class {
489435
489482
  static {
@@ -489866,7 +489913,7 @@ __name(setUpdateHandler, "setUpdateHandler");
489866
489913
 
489867
489914
  // packages/cli/src/ui/hooks/useMessageQueue.ts
489868
489915
  init_esbuild_shims();
489869
- var import_react166 = __toESM(require_react(), 1);
489916
+ var import_react167 = __toESM(require_react(), 1);
489870
489917
  var MessageQueueStore = class {
489871
489918
  static {
489872
489919
  __name(this, "MessageQueueStore");
@@ -489920,15 +489967,15 @@ var MessageQueueStore = class {
489920
489967
  }
489921
489968
  };
489922
489969
  function useMessageQueue() {
489923
- const store = (0, import_react166.useMemo)(() => new MessageQueueStore(), []);
489924
- const messageQueue = (0, import_react166.useSyncExternalStore)(store.subscribe, store.getSnapshot);
489925
- const addMessage = (0, import_react166.useCallback)(
489970
+ const store = (0, import_react167.useMemo)(() => new MessageQueueStore(), []);
489971
+ const messageQueue = (0, import_react167.useSyncExternalStore)(store.subscribe, store.getSnapshot);
489972
+ const addMessage = (0, import_react167.useCallback)(
489926
489973
  (message) => store.addMessage(message),
489927
489974
  [store]
489928
489975
  );
489929
- const clearQueue = (0, import_react166.useCallback)(() => store.clearQueue(), [store]);
489930
- const popLast = (0, import_react166.useCallback)(() => store.popLast(), [store]);
489931
- const drain = (0, import_react166.useCallback)(() => store.drain(), [store]);
489976
+ const clearQueue = (0, import_react167.useCallback)(() => store.clearQueue(), [store]);
489977
+ const popLast = (0, import_react167.useCallback)(() => store.popLast(), [store]);
489978
+ const drain = (0, import_react167.useCallback)(() => store.drain(), [store]);
489932
489979
  return { messageQueue, addMessage, clearQueue, popLast, drain };
489933
489980
  }
489934
489981
  __name(useMessageQueue, "useMessageQueue");
@@ -489936,7 +489983,7 @@ __name(useMessageQueue, "useMessageQueue");
489936
489983
  // packages/cli/src/ui/hooks/useAutoAcceptIndicator.ts
489937
489984
  init_esbuild_shims();
489938
489985
  init_dist4();
489939
- var import_react167 = __toESM(require_react(), 1);
489986
+ var import_react168 = __toESM(require_react(), 1);
489940
489987
  function useAutoAcceptIndicator({
489941
489988
  config: config2,
489942
489989
  addItem,
@@ -489945,8 +489992,8 @@ function useAutoAcceptIndicator({
489945
489992
  disabled
489946
489993
  }) {
489947
489994
  const currentConfigValue = config2.getApprovalMode();
489948
- const [showAutoAcceptIndicator, setShowAutoAcceptIndicator] = (0, import_react167.useState)(currentConfigValue);
489949
- (0, import_react167.useEffect)(() => {
489995
+ const [showAutoAcceptIndicator, setShowAutoAcceptIndicator] = (0, import_react168.useState)(currentConfigValue);
489996
+ (0, import_react168.useEffect)(() => {
489950
489997
  setShowAutoAcceptIndicator(currentConfigValue);
489951
489998
  }, [currentConfigValue]);
489952
489999
  useKeypress(
@@ -489984,7 +490031,7 @@ __name(useAutoAcceptIndicator, "useAutoAcceptIndicator");
489984
490031
 
489985
490032
  // packages/cli/src/ui/hooks/useExtensionUpdates.ts
489986
490033
  init_esbuild_shims();
489987
- var import_react168 = __toESM(require_react(), 1);
490034
+ var import_react169 = __toESM(require_react(), 1);
489988
490035
  function confirmationRequestsReducer(state, action) {
489989
490036
  switch (action.type) {
489990
490037
  case "add":
@@ -490001,8 +490048,8 @@ var useConfirmUpdateRequests = /* @__PURE__ */ __name(() => {
490001
490048
  const [
490002
490049
  confirmUpdateExtensionRequests,
490003
490050
  dispatchConfirmUpdateExtensionRequests
490004
- ] = (0, import_react168.useReducer)(confirmationRequestsReducer, []);
490005
- const addConfirmUpdateExtensionRequest = (0, import_react168.useCallback)(
490051
+ ] = (0, import_react169.useReducer)(confirmationRequestsReducer, []);
490052
+ const addConfirmUpdateExtensionRequest = (0, import_react169.useCallback)(
490006
490053
  (original) => {
490007
490054
  const wrappedRequest = {
490008
490055
  prompt: original.prompt,
@@ -490040,11 +490087,11 @@ function settingInputRequestsReducer(state, action) {
490040
490087
  }
490041
490088
  __name(settingInputRequestsReducer, "settingInputRequestsReducer");
490042
490089
  var useSettingInputRequests = /* @__PURE__ */ __name(() => {
490043
- const [settingInputRequests, dispatchSettingInputRequests] = (0, import_react168.useReducer)(
490090
+ const [settingInputRequests, dispatchSettingInputRequests] = (0, import_react169.useReducer)(
490044
490091
  settingInputRequestsReducer,
490045
490092
  []
490046
490093
  );
490047
- const addSettingInputRequest = (0, import_react168.useCallback)(
490094
+ const addSettingInputRequest = (0, import_react169.useCallback)(
490048
490095
  (original) => {
490049
490096
  const wrappedRequest = {
490050
490097
  settingName: original.settingName,
@@ -490091,11 +490138,11 @@ function pluginChoiceRequestsReducer(state, action) {
490091
490138
  }
490092
490139
  __name(pluginChoiceRequestsReducer, "pluginChoiceRequestsReducer");
490093
490140
  var usePluginChoiceRequests = /* @__PURE__ */ __name(() => {
490094
- const [pluginChoiceRequests, dispatchPluginChoiceRequests] = (0, import_react168.useReducer)(
490141
+ const [pluginChoiceRequests, dispatchPluginChoiceRequests] = (0, import_react169.useReducer)(
490095
490142
  pluginChoiceRequestsReducer,
490096
490143
  []
490097
490144
  );
490098
- const addPluginChoiceRequest = (0, import_react168.useCallback)(
490145
+ const addPluginChoiceRequest = (0, import_react169.useCallback)(
490099
490146
  (original) => {
490100
490147
  const wrappedRequest = {
490101
490148
  marketplaceName: original.marketplaceName,
@@ -490129,12 +490176,12 @@ var usePluginChoiceRequests = /* @__PURE__ */ __name(() => {
490129
490176
  };
490130
490177
  }, "usePluginChoiceRequests");
490131
490178
  var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd6) => {
490132
- const [extensionsUpdateState, dispatchExtensionStateUpdate] = (0, import_react168.useReducer)(
490179
+ const [extensionsUpdateState, dispatchExtensionStateUpdate] = (0, import_react169.useReducer)(
490133
490180
  extensionUpdatesReducer,
490134
490181
  initialExtensionUpdatesState
490135
490182
  );
490136
490183
  const extensions = extensionManager.getLoadedExtensions();
490137
- (0, import_react168.useEffect)(() => {
490184
+ (0, import_react169.useEffect)(() => {
490138
490185
  (async () => {
490139
490186
  const extensionsToCheck = extensions.filter((extension) => {
490140
490187
  const currentStatus = extensionsUpdateState.extensionStatuses.get(
@@ -490162,7 +490209,7 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
490162
490209
  extensionsUpdateState.extensionStatuses,
490163
490210
  dispatchExtensionStateUpdate
490164
490211
  ]);
490165
- (0, import_react168.useEffect)(() => {
490212
+ (0, import_react169.useEffect)(() => {
490166
490213
  if (extensionsUpdateState.batchChecksInProgress > 0) {
490167
490214
  return;
490168
490215
  }
@@ -490221,7 +490268,7 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
490221
490268
  );
490222
490269
  }
490223
490270
  }, [extensions, extensionManager, extensionsUpdateState, addItem, cwd6]);
490224
- const extensionsUpdateStateComputed = (0, import_react168.useMemo)(() => {
490271
+ const extensionsUpdateStateComputed = (0, import_react169.useMemo)(() => {
490225
490272
  const result = /* @__PURE__ */ new Map();
490226
490273
  for (const [
490227
490274
  key,
@@ -490240,15 +490287,15 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
490240
490287
 
490241
490288
  // packages/cli/src/ui/hooks/useWelcomeBack.ts
490242
490289
  init_esbuild_shims();
490243
- var import_react169 = __toESM(require_react(), 1);
490290
+ var import_react170 = __toESM(require_react(), 1);
490244
490291
  init_dist4();
490245
490292
  function useWelcomeBack(config2, submitQuery, buffer, settings2) {
490246
- const [welcomeBackInfo, setWelcomeBackInfo] = (0, import_react169.useState)(null);
490247
- const [showWelcomeBackDialog, setShowWelcomeBackDialog] = (0, import_react169.useState)(false);
490248
- const [welcomeBackChoice, setWelcomeBackChoice] = (0, import_react169.useState)(null);
490249
- const [shouldFillInput, setShouldFillInput] = (0, import_react169.useState)(false);
490250
- const [inputFillText, setInputFillText] = (0, import_react169.useState)(null);
490251
- const checkWelcomeBack = (0, import_react169.useCallback)(async () => {
490293
+ const [welcomeBackInfo, setWelcomeBackInfo] = (0, import_react170.useState)(null);
490294
+ const [showWelcomeBackDialog, setShowWelcomeBackDialog] = (0, import_react170.useState)(false);
490295
+ const [welcomeBackChoice, setWelcomeBackChoice] = (0, import_react170.useState)(null);
490296
+ const [shouldFillInput, setShouldFillInput] = (0, import_react170.useState)(false);
490297
+ const [inputFillText, setInputFillText] = (0, import_react170.useState)(null);
490298
+ const checkWelcomeBack = (0, import_react170.useCallback)(async () => {
490252
490299
  if (settings2.ui?.enableWelcomeBack === false) {
490253
490300
  return;
490254
490301
  }
@@ -490262,7 +490309,7 @@ function useWelcomeBack(config2, submitQuery, buffer, settings2) {
490262
490309
  config2.getDebugLogger().debug("Welcome back check failed:", error40);
490263
490310
  }
490264
490311
  }, [config2, settings2.ui?.enableWelcomeBack]);
490265
- const handleWelcomeBackSelection = (0, import_react169.useCallback)(
490312
+ const handleWelcomeBackSelection = (0, import_react170.useCallback)(
490266
490313
  (choice2) => {
490267
490314
  setWelcomeBackChoice(choice2);
490268
490315
  setShowWelcomeBackDialog(false);
@@ -490274,21 +490321,21 @@ function useWelcomeBack(config2, submitQuery, buffer, settings2) {
490274
490321
  },
490275
490322
  [welcomeBackInfo]
490276
490323
  );
490277
- const handleWelcomeBackClose = (0, import_react169.useCallback)(() => {
490324
+ const handleWelcomeBackClose = (0, import_react170.useCallback)(() => {
490278
490325
  setWelcomeBackChoice("restart");
490279
490326
  setShowWelcomeBackDialog(false);
490280
490327
  }, []);
490281
- const clearInputFill = (0, import_react169.useCallback)(() => {
490328
+ const clearInputFill = (0, import_react170.useCallback)(() => {
490282
490329
  setShouldFillInput(false);
490283
490330
  setInputFillText(null);
490284
490331
  }, []);
490285
- (0, import_react169.useEffect)(() => {
490332
+ (0, import_react170.useEffect)(() => {
490286
490333
  if (shouldFillInput && inputFillText) {
490287
490334
  buffer.setText(inputFillText);
490288
490335
  clearInputFill();
490289
490336
  }
490290
490337
  }, [shouldFillInput, inputFillText, buffer, clearInputFill]);
490291
- (0, import_react169.useEffect)(() => {
490338
+ (0, import_react170.useEffect)(() => {
490292
490339
  checkWelcomeBack();
490293
490340
  }, [checkWelcomeBack]);
490294
490341
  return {
@@ -490309,9 +490356,9 @@ __name(useWelcomeBack, "useWelcomeBack");
490309
490356
 
490310
490357
  // packages/cli/src/ui/hooks/useDialogClose.ts
490311
490358
  init_esbuild_shims();
490312
- var import_react170 = __toESM(require_react(), 1);
490359
+ var import_react171 = __toESM(require_react(), 1);
490313
490360
  function useDialogClose(options2) {
490314
- const closeAnyOpenDialog = (0, import_react170.useCallback)(() => {
490361
+ const closeAnyOpenDialog = (0, import_react171.useCallback)(() => {
490315
490362
  if (options2.isThemeDialogOpen) {
490316
490363
  options2.handleThemeSelect(void 0, "User" /* User */);
490317
490364
  return true;
@@ -490347,14 +490394,14 @@ __name(useDialogClose, "useDialogClose");
490347
490394
 
490348
490395
  // packages/cli/src/ui/hooks/useInitializationAuthError.ts
490349
490396
  init_esbuild_shims();
490350
- var import_react171 = __toESM(require_react(), 1);
490397
+ var import_react172 = __toESM(require_react(), 1);
490351
490398
  var useInitializationAuthError = /* @__PURE__ */ __name((authError, onAuthError) => {
490352
- const hasHandled = (0, import_react171.useRef)(false);
490353
- const authErrorRef = (0, import_react171.useRef)(authError);
490354
- const onAuthErrorRef = (0, import_react171.useRef)(onAuthError);
490399
+ const hasHandled = (0, import_react172.useRef)(false);
490400
+ const authErrorRef = (0, import_react172.useRef)(authError);
490401
+ const onAuthErrorRef = (0, import_react172.useRef)(onAuthError);
490355
490402
  authErrorRef.current = authError;
490356
490403
  onAuthErrorRef.current = onAuthError;
490357
- (0, import_react171.useEffect)(() => {
490404
+ (0, import_react172.useEffect)(() => {
490358
490405
  if (hasHandled.current) {
490359
490406
  return;
490360
490407
  }
@@ -490367,13 +490414,13 @@ var useInitializationAuthError = /* @__PURE__ */ __name((authError, onAuthError)
490367
490414
 
490368
490415
  // packages/cli/src/ui/hooks/useSubagentCreateDialog.ts
490369
490416
  init_esbuild_shims();
490370
- var import_react172 = __toESM(require_react(), 1);
490417
+ var import_react173 = __toESM(require_react(), 1);
490371
490418
  function useSubagentCreateDialog() {
490372
- const [isSubagentCreateDialogOpen, setIsSubagentCreateDialogOpen] = (0, import_react172.useState)(false);
490373
- const openSubagentCreateDialog = (0, import_react172.useCallback)(() => {
490419
+ const [isSubagentCreateDialogOpen, setIsSubagentCreateDialogOpen] = (0, import_react173.useState)(false);
490420
+ const openSubagentCreateDialog = (0, import_react173.useCallback)(() => {
490374
490421
  setIsSubagentCreateDialogOpen(true);
490375
490422
  }, []);
490376
- const closeSubagentCreateDialog = (0, import_react172.useCallback)(() => {
490423
+ const closeSubagentCreateDialog = (0, import_react173.useCallback)(() => {
490377
490424
  setIsSubagentCreateDialogOpen(false);
490378
490425
  }, []);
490379
490426
  return {
@@ -490386,13 +490433,13 @@ __name(useSubagentCreateDialog, "useSubagentCreateDialog");
490386
490433
 
490387
490434
  // packages/cli/src/ui/hooks/useAgentsManagerDialog.ts
490388
490435
  init_esbuild_shims();
490389
- var import_react173 = __toESM(require_react(), 1);
490436
+ var import_react174 = __toESM(require_react(), 1);
490390
490437
  var useAgentsManagerDialog = /* @__PURE__ */ __name(() => {
490391
- const [isAgentsManagerDialogOpen, setIsAgentsManagerDialogOpen] = (0, import_react173.useState)(false);
490392
- const openAgentsManagerDialog = (0, import_react173.useCallback)(() => {
490438
+ const [isAgentsManagerDialogOpen, setIsAgentsManagerDialogOpen] = (0, import_react174.useState)(false);
490439
+ const openAgentsManagerDialog = (0, import_react174.useCallback)(() => {
490393
490440
  setIsAgentsManagerDialogOpen(true);
490394
490441
  }, []);
490395
- const closeAgentsManagerDialog = (0, import_react173.useCallback)(() => {
490442
+ const closeAgentsManagerDialog = (0, import_react174.useCallback)(() => {
490396
490443
  setIsAgentsManagerDialogOpen(false);
490397
490444
  }, []);
490398
490445
  return {
@@ -490404,13 +490451,13 @@ var useAgentsManagerDialog = /* @__PURE__ */ __name(() => {
490404
490451
 
490405
490452
  // packages/cli/src/ui/hooks/useExtensionsManagerDialog.ts
490406
490453
  init_esbuild_shims();
490407
- var import_react174 = __toESM(require_react(), 1);
490454
+ var import_react175 = __toESM(require_react(), 1);
490408
490455
  var useExtensionsManagerDialog = /* @__PURE__ */ __name(() => {
490409
- const [isExtensionsManagerDialogOpen, setIsExtensionsManagerDialogOpen] = (0, import_react174.useState)(false);
490410
- const openExtensionsManagerDialog = (0, import_react174.useCallback)(() => {
490456
+ const [isExtensionsManagerDialogOpen, setIsExtensionsManagerDialogOpen] = (0, import_react175.useState)(false);
490457
+ const openExtensionsManagerDialog = (0, import_react175.useCallback)(() => {
490411
490458
  setIsExtensionsManagerDialogOpen(true);
490412
490459
  }, []);
490413
- const closeExtensionsManagerDialog = (0, import_react174.useCallback)(() => {
490460
+ const closeExtensionsManagerDialog = (0, import_react175.useCallback)(() => {
490414
490461
  setIsExtensionsManagerDialogOpen(false);
490415
490462
  }, []);
490416
490463
  return {
@@ -490422,13 +490469,13 @@ var useExtensionsManagerDialog = /* @__PURE__ */ __name(() => {
490422
490469
 
490423
490470
  // packages/cli/src/ui/hooks/useMcpDialog.ts
490424
490471
  init_esbuild_shims();
490425
- var import_react175 = __toESM(require_react(), 1);
490472
+ var import_react176 = __toESM(require_react(), 1);
490426
490473
  var useMcpDialog = /* @__PURE__ */ __name(() => {
490427
- const [isMcpDialogOpen, setIsMcpDialogOpen] = (0, import_react175.useState)(false);
490428
- const openMcpDialog = (0, import_react175.useCallback)(() => {
490474
+ const [isMcpDialogOpen, setIsMcpDialogOpen] = (0, import_react176.useState)(false);
490475
+ const openMcpDialog = (0, import_react176.useCallback)(() => {
490429
490476
  setIsMcpDialogOpen(true);
490430
490477
  }, []);
490431
- const closeMcpDialog = (0, import_react175.useCallback)(() => {
490478
+ const closeMcpDialog = (0, import_react176.useCallback)(() => {
490432
490479
  setIsMcpDialogOpen(false);
490433
490480
  }, []);
490434
490481
  return {
@@ -490440,13 +490487,13 @@ var useMcpDialog = /* @__PURE__ */ __name(() => {
490440
490487
 
490441
490488
  // packages/cli/src/ui/hooks/useHooksDialog.ts
490442
490489
  init_esbuild_shims();
490443
- var import_react176 = __toESM(require_react(), 1);
490490
+ var import_react177 = __toESM(require_react(), 1);
490444
490491
  var useHooksDialog = /* @__PURE__ */ __name(() => {
490445
- const [isHooksDialogOpen, setIsHooksDialogOpen] = (0, import_react176.useState)(false);
490446
- const openHooksDialog = (0, import_react176.useCallback)(() => {
490492
+ const [isHooksDialogOpen, setIsHooksDialogOpen] = (0, import_react177.useState)(false);
490493
+ const openHooksDialog = (0, import_react177.useCallback)(() => {
490447
490494
  setIsHooksDialogOpen(true);
490448
490495
  }, []);
490449
- const closeHooksDialog = (0, import_react176.useCallback)(() => {
490496
+ const closeHooksDialog = (0, import_react177.useCallback)(() => {
490450
490497
  setIsHooksDialogOpen(false);
490451
490498
  }, []);
490452
490499
  return {
@@ -490458,7 +490505,7 @@ var useHooksDialog = /* @__PURE__ */ __name(() => {
490458
490505
 
490459
490506
  // packages/cli/src/ui/hooks/useAttentionNotifications.ts
490460
490507
  init_esbuild_shims();
490461
- var import_react177 = __toESM(require_react(), 1);
490508
+ var import_react178 = __toESM(require_react(), 1);
490462
490509
 
490463
490510
  // packages/cli/src/utils/attentionNotification.ts
490464
490511
  init_esbuild_shims();
@@ -490495,10 +490542,10 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
490495
490542
  config: config2
490496
490543
  }) => {
490497
490544
  const terminalBellEnabled = settings2?.merged?.general?.terminalBell ?? true;
490498
- const awaitingNotificationSentRef = (0, import_react177.useRef)(false);
490499
- const respondingElapsedRef = (0, import_react177.useRef)(0);
490500
- const idleNotificationSentRef = (0, import_react177.useRef)(false);
490501
- (0, import_react177.useEffect)(() => {
490545
+ const awaitingNotificationSentRef = (0, import_react178.useRef)(false);
490546
+ const respondingElapsedRef = (0, import_react178.useRef)(0);
490547
+ const idleNotificationSentRef = (0, import_react178.useRef)(false);
490548
+ (0, import_react178.useEffect)(() => {
490502
490549
  if (streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ && !isFocused && !awaitingNotificationSentRef.current) {
490503
490550
  notifyTerminalAttention("tool_approval" /* ToolApproval */, {
490504
490551
  enabled: terminalBellEnabled
@@ -490509,7 +490556,7 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
490509
490556
  awaitingNotificationSentRef.current = false;
490510
490557
  }
490511
490558
  }, [isFocused, streamingState, terminalBellEnabled]);
490512
- (0, import_react177.useEffect)(() => {
490559
+ (0, import_react178.useEffect)(() => {
490513
490560
  if (streamingState === "responding" /* Responding */) {
490514
490561
  respondingElapsedRef.current = elapsedTime;
490515
490562
  idleNotificationSentRef.current = false;
@@ -490545,7 +490592,7 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
490545
490592
 
490546
490593
  // packages/cli/src/ui/hooks/useVoice.ts
490547
490594
  init_esbuild_shims();
490548
- var import_react178 = __toESM(require_react(), 1);
490595
+ var import_react179 = __toESM(require_react(), 1);
490549
490596
  import os46 from "node:os";
490550
490597
  import path148 from "node:path";
490551
490598
  import fs135 from "node:fs";
@@ -490580,12 +490627,12 @@ __name(transcribe, "transcribe");
490580
490627
 
490581
490628
  // packages/cli/src/ui/hooks/useVoice.ts
490582
490629
  function useVoice(sttEndpoint, sttApiKey) {
490583
- const [voiceState, setVoiceState] = (0, import_react178.useState)("idle");
490584
- const [error40, setError] = (0, import_react178.useState)(null);
490585
- const procRef = (0, import_react178.useRef)(null);
490586
- const audioPathRef = (0, import_react178.useRef)(null);
490587
- const backend = (0, import_react178.useMemo)(() => detectBackend2(), []);
490588
- const start2 = (0, import_react178.useCallback)(async () => {
490630
+ const [voiceState, setVoiceState] = (0, import_react179.useState)("idle");
490631
+ const [error40, setError] = (0, import_react179.useState)(null);
490632
+ const procRef = (0, import_react179.useRef)(null);
490633
+ const audioPathRef = (0, import_react179.useRef)(null);
490634
+ const backend = (0, import_react179.useMemo)(() => detectBackend2(), []);
490635
+ const start2 = (0, import_react179.useCallback)(async () => {
490589
490636
  if (voiceState !== "idle") return;
490590
490637
  const tmpPath = path148.join(os46.tmpdir(), `proto-voice-${Date.now()}.wav`);
490591
490638
  audioPathRef.current = tmpPath;
@@ -490598,7 +490645,7 @@ function useVoice(sttEndpoint, sttApiKey) {
490598
490645
  setError(e4 instanceof Error ? e4.message : String(e4));
490599
490646
  }
490600
490647
  }, [voiceState, backend]);
490601
- const stop3 = (0, import_react178.useCallback)(async () => {
490648
+ const stop3 = (0, import_react179.useCallback)(async () => {
490602
490649
  if (voiceState !== "recording" || !procRef.current || !audioPathRef.current) {
490603
490650
  return "";
490604
490651
  }
@@ -490631,7 +490678,7 @@ function useVoice(sttEndpoint, sttApiKey) {
490631
490678
  return "";
490632
490679
  }
490633
490680
  }, [voiceState, sttEndpoint, sttApiKey]);
490634
- const reset = (0, import_react178.useCallback)(() => {
490681
+ const reset = (0, import_react179.useCallback)(() => {
490635
490682
  setVoiceState("idle");
490636
490683
  setError(null);
490637
490684
  }, []);
@@ -490647,7 +490694,7 @@ function useVoice(sttEndpoint, sttApiKey) {
490647
490694
  __name(useVoice, "useVoice");
490648
490695
 
490649
490696
  // packages/cli/src/ui/AppContainer.tsx
490650
- var import_jsx_runtime143 = __toESM(require_jsx_runtime(), 1);
490697
+ var import_jsx_runtime144 = __toESM(require_jsx_runtime(), 1);
490651
490698
  var debugLogger163 = createDebugLogger("APP_CONTAINER");
490652
490699
  function isToolExecuting(pendingHistoryItems) {
490653
490700
  return pendingHistoryItems.some((item) => {
@@ -490666,21 +490713,21 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
490666
490713
  const { settings: settings2, config: config2, initializationResult } = props;
490667
490714
  const historyManager = useHistory();
490668
490715
  useMemoryMonitor(historyManager);
490669
- const [debugMessage, setDebugMessage] = (0, import_react179.useState)("");
490670
- const [quittingMessages, setQuittingMessages] = (0, import_react179.useState)(null);
490671
- const [themeError, setThemeError] = (0, import_react179.useState)(
490716
+ const [debugMessage, setDebugMessage] = (0, import_react180.useState)("");
490717
+ const [quittingMessages, setQuittingMessages] = (0, import_react180.useState)(null);
490718
+ const [themeError, setThemeError] = (0, import_react180.useState)(
490672
490719
  initializationResult.themeError
490673
490720
  );
490674
- const [isProcessing, setIsProcessing] = (0, import_react179.useState)(false);
490675
- const [embeddedShellFocused, setEmbeddedShellFocused] = (0, import_react179.useState)(false);
490676
- const [geminiMdFileCount, setGeminiMdFileCount] = (0, import_react179.useState)(
490721
+ const [isProcessing, setIsProcessing] = (0, import_react180.useState)(false);
490722
+ const [embeddedShellFocused, setEmbeddedShellFocused] = (0, import_react180.useState)(false);
490723
+ const [geminiMdFileCount, setGeminiMdFileCount] = (0, import_react180.useState)(
490677
490724
  initializationResult.geminiMdFileCount
490678
490725
  );
490679
- const [shellModeActive, setShellModeActive] = (0, import_react179.useState)(false);
490680
- const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = (0, import_react179.useState)(false);
490681
- const [historyRemountKey, setHistoryRemountKey] = (0, import_react179.useState)(0);
490682
- const [updateInfo, setUpdateInfo] = (0, import_react179.useState)(null);
490683
- const [isTrustedFolder, setIsTrustedFolder] = (0, import_react179.useState)(
490726
+ const [shellModeActive, setShellModeActive] = (0, import_react180.useState)(false);
490727
+ const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = (0, import_react180.useState)(false);
490728
+ const [historyRemountKey, setHistoryRemountKey] = (0, import_react180.useState)(0);
490729
+ const [updateInfo, setUpdateInfo] = (0, import_react180.useState)(null);
490730
+ const [isTrustedFolder, setIsTrustedFolder] = (0, import_react180.useState)(
490684
490731
  config2.isTrustedFolder()
490685
490732
  );
490686
490733
  const extensionManager = config2.getExtensionManager();
@@ -490735,43 +490782,43 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
490735
490782
  config2.getWorkingDir()
490736
490783
  );
490737
490784
  const { codingPlanUpdateRequest, dismissCodingPlanUpdate } = useCodingPlanUpdates(settings2, config2, historyManager.addItem);
490738
- const [isTrustDialogOpen, setTrustDialogOpen] = (0, import_react179.useState)(false);
490739
- const openTrustDialog = (0, import_react179.useCallback)(() => setTrustDialogOpen(true), []);
490740
- const closeTrustDialog = (0, import_react179.useCallback)(() => setTrustDialogOpen(false), []);
490741
- const [isPermissionsDialogOpen, setPermissionsDialogOpen] = (0, import_react179.useState)(false);
490742
- const openPermissionsDialog = (0, import_react179.useCallback)(
490785
+ const [isTrustDialogOpen, setTrustDialogOpen] = (0, import_react180.useState)(false);
490786
+ const openTrustDialog = (0, import_react180.useCallback)(() => setTrustDialogOpen(true), []);
490787
+ const closeTrustDialog = (0, import_react180.useCallback)(() => setTrustDialogOpen(false), []);
490788
+ const [isPermissionsDialogOpen, setPermissionsDialogOpen] = (0, import_react180.useState)(false);
490789
+ const openPermissionsDialog = (0, import_react180.useCallback)(
490743
490790
  () => setPermissionsDialogOpen(true),
490744
490791
  []
490745
490792
  );
490746
- const closePermissionsDialog = (0, import_react179.useCallback)(
490793
+ const closePermissionsDialog = (0, import_react180.useCallback)(
490747
490794
  () => setPermissionsDialogOpen(false),
490748
490795
  []
490749
490796
  );
490750
- const [currentModel, setCurrentModel] = (0, import_react179.useState)(() => config2.getModel());
490751
- const [isConfigInitialized, setConfigInitialized] = (0, import_react179.useState)(false);
490752
- const [userMessages, setUserMessages] = (0, import_react179.useState)([]);
490797
+ const [currentModel, setCurrentModel] = (0, import_react180.useState)(() => config2.getModel());
490798
+ const [isConfigInitialized, setConfigInitialized] = (0, import_react180.useState)(false);
490799
+ const [userMessages, setUserMessages] = (0, import_react180.useState)([]);
490753
490800
  const { columns: terminalWidth, rows: terminalHeight } = useTerminalSize();
490754
490801
  const { stdin: stdin3, setRawMode } = use_stdin_default();
490755
490802
  const { stdout: stdout3 } = use_stdout_default();
490756
490803
  const { stats: sessionStats, startNewSession } = useSessionStats();
490757
490804
  const logger10 = useLogger(config2.storage, sessionStats.sessionId);
490758
490805
  const branchName = useGitBranchName(config2.getTargetDir());
490759
- const mainControlsRef = (0, import_react179.useRef)(null);
490806
+ const mainControlsRef = (0, import_react180.useRef)(null);
490760
490807
  const staticExtraHeight = 3;
490761
- const [sessionName, setSessionName] = (0, import_react179.useState)(null);
490808
+ const [sessionName, setSessionName] = (0, import_react180.useState)(null);
490762
490809
  useInitializationEffects(
490763
490810
  config2,
490764
490811
  historyManager,
490765
490812
  setConfigInitialized,
490766
490813
  setSessionName
490767
490814
  );
490768
- (0, import_react179.useEffect)(
490815
+ (0, import_react180.useEffect)(
490769
490816
  () => setUpdateHandler(historyManager.addItem, setUpdateInfo),
490770
490817
  [historyManager.addItem]
490771
490818
  );
490772
490819
  const { lastFinished } = useBackgroundAgentProgress();
490773
490820
  const addHistoryItem = historyManager.addItem;
490774
- (0, import_react179.useEffect)(() => {
490821
+ (0, import_react180.useEffect)(() => {
490775
490822
  if (!lastFinished?.hitLimit) return;
490776
490823
  addHistoryItem(
490777
490824
  {
@@ -490781,19 +490828,19 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
490781
490828
  Date.now()
490782
490829
  );
490783
490830
  }, [lastFinished, addHistoryItem]);
490784
- (0, import_react179.useEffect)(() => {
490831
+ (0, import_react180.useEffect)(() => {
490785
490832
  const unsubscribe = config2.onModelChange((model) => {
490786
490833
  setCurrentModel(model);
490787
490834
  });
490788
490835
  return unsubscribe;
490789
490836
  }, [config2]);
490790
- const { inputWidth, suggestionsWidth } = (0, import_react179.useMemo)(() => {
490837
+ const { inputWidth, suggestionsWidth } = (0, import_react180.useMemo)(() => {
490791
490838
  const { inputWidth: inputWidth2, suggestionsWidth: suggestionsWidth2 } = calculatePromptWidths(terminalWidth);
490792
490839
  return { inputWidth: inputWidth2, suggestionsWidth: suggestionsWidth2 };
490793
490840
  }, [terminalWidth]);
490794
490841
  const mainAreaWidth = Math.min(terminalWidth - 4, 100);
490795
490842
  const staticAreaMaxItemHeight = Math.max(terminalHeight * 4, 100);
490796
- const isValidPath = (0, import_react179.useCallback)((filePath) => {
490843
+ const isValidPath = (0, import_react180.useCallback)((filePath) => {
490797
490844
  try {
490798
490845
  return fs136.existsSync(filePath) && fs136.statSync(filePath).isFile();
490799
490846
  } catch (_e2) {
@@ -490808,7 +490855,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
490808
490855
  isValidPath,
490809
490856
  shellModeActive
490810
490857
  });
490811
- (0, import_react179.useEffect)(() => {
490858
+ (0, import_react180.useEffect)(() => {
490812
490859
  const fetchUserMessages = /* @__PURE__ */ __name(async () => {
490813
490860
  const pastMessagesRaw = await logger10?.getPreviousUserMessages() || [];
490814
490861
  const currentSessionUserMessages = historyManager.history.filter(
@@ -490831,13 +490878,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
490831
490878
  }, "fetchUserMessages");
490832
490879
  fetchUserMessages();
490833
490880
  }, [historyManager.history, logger10]);
490834
- const refreshStatic = (0, import_react179.useCallback)(() => {
490881
+ const refreshStatic = (0, import_react180.useCallback)(() => {
490835
490882
  stdout3.write("\x1B[?2026h");
490836
490883
  stdout3.write(base_exports.clearTerminal);
490837
490884
  stdout3.write("\x1B[?2026l");
490838
490885
  setHistoryRemountKey((prev) => prev + 1);
490839
490886
  }, [setHistoryRemountKey, stdout3]);
490840
- (0, import_react179.useEffect)(() => {
490887
+ (0, import_react180.useEffect)(() => {
490841
490888
  const unsubscribe = config2.onModelChange((model) => {
490842
490889
  setCurrentModel((prev) => {
490843
490890
  if (prev === model) {
@@ -490879,7 +490926,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
490879
490926
  cancelAuthentication
490880
490927
  } = useAuthCommand(settings2, config2, historyManager.addItem, refreshStatic);
490881
490928
  useInitializationAuthError(initializationResult.authError, onAuthError);
490882
- (0, import_react179.useEffect)(() => {
490929
+ (0, import_react180.useEffect)(() => {
490883
490930
  const currentAuthType = config2.getModelsConfig().getCurrentAuthType();
490884
490931
  if (settings2.merged.security?.auth?.enforcedType && currentAuthType && settings2.merged.security?.auth.enforcedType !== currentAuthType) {
490885
490932
  onAuthError(
@@ -490905,7 +490952,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
490905
490952
  config2,
490906
490953
  onAuthError
490907
490954
  ]);
490908
- const [editorError, setEditorError] = (0, import_react179.useState)(null);
490955
+ const [editorError, setEditorError] = (0, import_react180.useState)(null);
490909
490956
  const {
490910
490957
  isEditorDialogOpen,
490911
490958
  openEditorDialog,
@@ -490960,10 +491007,10 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
490960
491007
  } = useExtensionsManagerDialog();
490961
491008
  const { isMcpDialogOpen, openMcpDialog, closeMcpDialog } = useMcpDialog();
490962
491009
  const { isHooksDialogOpen, openHooksDialog, closeHooksDialog } = useHooksDialog();
490963
- const [isRewindDialogOpen, setIsRewindDialogOpen] = (0, import_react179.useState)(false);
490964
- const openRewindDialog = (0, import_react179.useCallback)(() => setIsRewindDialogOpen(true), []);
490965
- const closeRewindDialog = (0, import_react179.useCallback)(() => setIsRewindDialogOpen(false), []);
490966
- const slashCommandActions = (0, import_react179.useMemo)(
491010
+ const [isRewindDialogOpen, setIsRewindDialogOpen] = (0, import_react180.useState)(false);
491011
+ const openRewindDialog = (0, import_react180.useCallback)(() => setIsRewindDialogOpen(true), []);
491012
+ const closeRewindDialog = (0, import_react180.useCallback)(() => setIsRewindDialogOpen(false), []);
491013
+ const slashCommandActions = (0, import_react180.useMemo)(
490967
491014
  () => ({
490968
491015
  openAuthDialog,
490969
491016
  openThemeDialog,
@@ -491046,14 +491093,14 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491046
491093
  logger10,
491047
491094
  setSessionName
491048
491095
  );
491049
- const onDebugMessage = (0, import_react179.useCallback)(
491096
+ const onDebugMessage = (0, import_react180.useCallback)(
491050
491097
  (message) => {
491051
491098
  config2.getDebugLogger().debug(message);
491052
491099
  },
491053
491100
  [config2]
491054
491101
  );
491055
491102
  const stableAddItem = historyManager.addItem;
491056
- const performMemoryRefresh = (0, import_react179.useCallback)(async () => {
491103
+ const performMemoryRefresh = (0, import_react180.useCallback)(async () => {
491057
491104
  stableAddItem(
491058
491105
  {
491059
491106
  type: "info" /* INFO */,
@@ -491099,7 +491146,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491099
491146
  debugLogger163.error("Error refreshing memory:", error40);
491100
491147
  }
491101
491148
  }, [config2, stableAddItem, settings2.merged]);
491102
- const cancelHandlerRef = (0, import_react179.useRef)(() => {
491149
+ const cancelHandlerRef = (0, import_react180.useRef)(() => {
491103
491150
  });
491104
491151
  const { messageQueue, addMessage, popLast, drain } = useMessageQueue();
491105
491152
  const voiceEnabled = settings2.merged.voice?.enabled ?? false;
@@ -491151,7 +491198,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491151
491198
  drain,
491152
491199
  submitQuery
491153
491200
  );
491154
- const [hasSuggestionsVisible, setHasSuggestionsVisible] = (0, import_react179.useState)(false);
491201
+ const [hasSuggestionsVisible, setHasSuggestionsVisible] = (0, import_react180.useState)(false);
491155
491202
  const agentViewState = useAgentViewState();
491156
491203
  const geminiClient = config2.getGeminiClient();
491157
491204
  const showAutoAcceptIndicator = useAutoAcceptIndicator({
@@ -491179,7 +491226,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491179
491226
  settingInputRequests,
491180
491227
  pendingGeminiHistoryItems
491181
491228
  });
491182
- const handleFinalSubmit = (0, import_react179.useCallback)(
491229
+ const handleFinalSubmit = (0, import_react180.useCallback)(
491183
491230
  (submittedValue) => {
491184
491231
  if (agentViewState.activeView !== "main") {
491185
491232
  const agent = agentViewState.agents.get(agentViewState.activeView);
@@ -491287,7 +491334,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491287
491334
  speculationRef
491288
491335
  ]
491289
491336
  );
491290
- const handleArenaModelsSelected = (0, import_react179.useCallback)(
491337
+ const handleArenaModelsSelected = (0, import_react180.useCallback)(
491291
491338
  (models) => {
491292
491339
  const value = models.join(",");
491293
491340
  buffer.setText(`/arena start --models ${value} `);
@@ -491302,7 +491349,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491302
491349
  handleWelcomeBackSelection,
491303
491350
  handleWelcomeBackClose
491304
491351
  } = useWelcomeBack(config2, handleFinalSubmit, buffer, settings2.merged);
491305
- cancelHandlerRef.current = (0, import_react179.useCallback)(() => {
491352
+ cancelHandlerRef.current = (0, import_react180.useCallback)(() => {
491306
491353
  const pendingHistoryItems2 = [
491307
491354
  ...pendingSlashCommandHistoryItems,
491308
491355
  ...pendingGeminiHistoryItems
@@ -491327,15 +491374,15 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491327
491374
  pendingSlashCommandHistoryItems,
491328
491375
  pendingGeminiHistoryItems
491329
491376
  ]);
491330
- const handleClearScreen = (0, import_react179.useCallback)(() => {
491377
+ const handleClearScreen = (0, import_react180.useCallback)(() => {
491331
491378
  historyManager.clearItems();
491332
491379
  clearScreen2();
491333
491380
  refreshStatic();
491334
491381
  }, [historyManager, refreshStatic]);
491335
491382
  const { handleInput: vimHandleInput } = useVim(buffer, handleFinalSubmit);
491336
491383
  const isInputActive = !initError && !isProcessing && (streamingState === "idle" /* Idle */ || streamingState === "responding" /* Responding */);
491337
- const [controlsHeight, setControlsHeight] = (0, import_react179.useState)(0);
491338
- (0, import_react179.useLayoutEffect)(() => {
491384
+ const [controlsHeight, setControlsHeight] = (0, import_react180.useState)(0);
491385
+ (0, import_react180.useLayoutEffect)(() => {
491339
491386
  if (mainControlsRef.current) {
491340
491387
  const fullFooterMeasurement = measure_element_default(mainControlsRef.current);
491341
491388
  if (fullFooterMeasurement.height > 0) {
@@ -491368,13 +491415,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491368
491415
  history: historyManager.history,
491369
491416
  awayThresholdMinutes: settings2.merged.general?.sessionRecapAwayThresholdMinutes
491370
491417
  });
491371
- const contextFileNames = (0, import_react179.useMemo)(() => {
491418
+ const contextFileNames = (0, import_react180.useMemo)(() => {
491372
491419
  const fromSettings = settings2.merged.context?.fileName;
491373
491420
  return fromSettings ? Array.isArray(fromSettings) ? fromSettings : [fromSettings] : getAllGeminiMdFilenames();
491374
491421
  }, [settings2.merged.context?.fileName]);
491375
- const initialPrompt = (0, import_react179.useMemo)(() => config2.getQuestion(), [config2]);
491376
- const initialPromptSubmitted = (0, import_react179.useRef)(false);
491377
- (0, import_react179.useEffect)(() => {
491422
+ const initialPrompt = (0, import_react180.useMemo)(() => config2.getQuestion(), [config2]);
491423
+ const initialPromptSubmitted = (0, import_react180.useRef)(false);
491424
+ (0, import_react180.useEffect)(() => {
491378
491425
  if (activePtyId) {
491379
491426
  ShellExecutionService.resizePty(
491380
491427
  activePtyId,
@@ -491383,7 +491430,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491383
491430
  );
491384
491431
  }
491385
491432
  }, [terminalWidth, availableTerminalHeight, activePtyId]);
491386
- (0, import_react179.useEffect)(() => {
491433
+ (0, import_react180.useEffect)(() => {
491387
491434
  if (initialPrompt && isConfigInitialized && !initialPromptSubmitted.current && !isAuthenticating && !isAuthDialogOpen && !isThemeDialogOpen && !isEditorDialogOpen && !showWelcomeBackDialog && welcomeBackChoice !== "restart" && geminiClient?.isInitialized?.()) {
491388
491435
  handleFinalSubmit(initialPrompt);
491389
491436
  initialPromptSubmitted.current = true;
@@ -491400,9 +491447,9 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491400
491447
  welcomeBackChoice,
491401
491448
  geminiClient
491402
491449
  ]);
491403
- const [idePromptAnswered, setIdePromptAnswered] = (0, import_react179.useState)(false);
491404
- const [currentIDE, setCurrentIDE] = (0, import_react179.useState)(null);
491405
- (0, import_react179.useEffect)(() => {
491450
+ const [idePromptAnswered, setIdePromptAnswered] = (0, import_react180.useState)(false);
491451
+ const [currentIDE, setCurrentIDE] = (0, import_react180.useState)(null);
491452
+ (0, import_react180.useEffect)(() => {
491406
491453
  const getIde = /* @__PURE__ */ __name(async () => {
491407
491454
  const ideClient = await IdeClient.getInstance();
491408
491455
  const currentIde = ideClient.getCurrentIde();
@@ -491418,24 +491465,24 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491418
491465
  tomlFiles: commandMigrationTomlFiles,
491419
491466
  setShowMigrationNudge: setShowCommandMigrationNudge
491420
491467
  } = useCommandMigration(settings2, config2.storage);
491421
- const [ideContextState, setIdeContextState] = (0, import_react179.useState)();
491422
- const [showIdeRestartPrompt, setShowIdeRestartPrompt] = (0, import_react179.useState)(false);
491468
+ const [ideContextState, setIdeContextState] = (0, import_react180.useState)();
491469
+ const [showIdeRestartPrompt, setShowIdeRestartPrompt] = (0, import_react180.useState)(false);
491423
491470
  const { isFolderTrustDialogOpen, handleFolderTrustSelect, isRestarting } = useFolderTrust(settings2, setIsTrustedFolder);
491424
491471
  const {
491425
491472
  needsRestart: ideNeedsRestart,
491426
491473
  restartReason: ideTrustRestartReason
491427
491474
  } = useIdeTrustListener();
491428
- (0, import_react179.useEffect)(() => {
491475
+ (0, import_react180.useEffect)(() => {
491429
491476
  if (ideNeedsRestart) {
491430
491477
  setShowIdeRestartPrompt(true);
491431
491478
  }
491432
491479
  }, [ideNeedsRestart]);
491433
- (0, import_react179.useEffect)(() => {
491480
+ (0, import_react180.useEffect)(() => {
491434
491481
  const unsubscribe = ideContextStore.subscribe(setIdeContextState);
491435
491482
  setIdeContextState(ideContextStore.get());
491436
491483
  return unsubscribe;
491437
491484
  }, []);
491438
- const handleIdePromptComplete = (0, import_react179.useCallback)(
491485
+ const handleIdePromptComplete = (0, import_react180.useCallback)(
491439
491486
  (result) => {
491440
491487
  if (result.userSelection === "yes") {
491441
491488
  if (result.isExtensionPreInstalled) {
@@ -491451,7 +491498,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491451
491498
  },
491452
491499
  [handleSlashCommand2, settings2]
491453
491500
  );
491454
- const handleCommandMigrationComplete = (0, import_react179.useCallback)(
491501
+ const handleCommandMigrationComplete = (0, import_react180.useCallback)(
491455
491502
  async (result) => {
491456
491503
  setShowCommandMigrationNudge(false);
491457
491504
  if (result.userSelection === "yes") {
@@ -491610,11 +491657,11 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
491610
491657
  history: historyManager.history,
491611
491658
  sessionStats
491612
491659
  });
491613
- const pendingHistoryItems = (0, import_react179.useMemo)(
491660
+ const pendingHistoryItems = (0, import_react180.useMemo)(
491614
491661
  () => [...pendingSlashCommandHistoryItems, ...pendingGeminiHistoryItems],
491615
491662
  [pendingSlashCommandHistoryItems, pendingGeminiHistoryItems]
491616
491663
  );
491617
- const uiState = (0, import_react179.useMemo)(
491664
+ const uiState = (0, import_react180.useMemo)(
491618
491665
  () => ({
491619
491666
  history: historyManager.history,
491620
491667
  historyManager,
@@ -491849,7 +491896,7 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
491849
491896
  dismissPromptSuggestion
491850
491897
  ]
491851
491898
  );
491852
- const uiActions = (0, import_react179.useMemo)(
491899
+ const uiActions = (0, import_react180.useMemo)(
491853
491900
  () => ({
491854
491901
  openThemeDialog,
491855
491902
  openEditorDialog,
@@ -491994,23 +492041,23 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
491994
492041
  submitFeedback
491995
492042
  ]
491996
492043
  );
491997
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(UIStateContext.Provider, { value: uiState, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(UIActionsContext.Provider, { value: uiActions, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(ConfigContext.Provider, { value: config2, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
492044
+ return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(UIStateContext.Provider, { value: uiState, children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(UIActionsContext.Provider, { value: uiActions, children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(ConfigContext.Provider, { value: config2, children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
491998
492045
  AppContext2.Provider,
491999
492046
  {
492000
492047
  value: {
492001
492048
  version: props.version,
492002
492049
  startupWarnings: props.startupWarnings || []
492003
492050
  },
492004
- children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(ShellFocusContext.Provider, { value: isFocused, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(App2, {}) })
492051
+ children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(ShellFocusContext.Provider, { value: isFocused, children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(App2, {}) })
492005
492052
  }
492006
492053
  ) }) }) });
492007
492054
  }, "AppContainer");
492008
492055
 
492009
492056
  // packages/cli/src/ui/hooks/useKittyKeyboardProtocol.ts
492010
492057
  init_esbuild_shims();
492011
- var import_react180 = __toESM(require_react(), 1);
492058
+ var import_react181 = __toESM(require_react(), 1);
492012
492059
  function useKittyKeyboardProtocol() {
492013
- const [status] = (0, import_react180.useState)({
492060
+ const [status] = (0, import_react181.useState)({
492014
492061
  supported: isKittyProtocolSupported(),
492015
492062
  enabled: isKittyProtocolEnabled(),
492016
492063
  checking: false
@@ -492133,7 +492180,7 @@ import { exec as exec4, execSync as execSync12, spawn as spawn15 } from "node:ch
492133
492180
  import os47 from "node:os";
492134
492181
  import path149 from "node:path";
492135
492182
  import fs137 from "node:fs";
492136
- import { fileURLToPath as fileURLToPath19 } from "node:url";
492183
+ import { fileURLToPath as fileURLToPath18 } from "node:url";
492137
492184
  init_dist4();
492138
492185
  import { promisify as promisify12 } from "node:util";
492139
492186
  import { randomBytes as randomBytes7 } from "node:crypto";
@@ -492250,7 +492297,7 @@ async function start_sandbox(config2, nodeArgs = [], cliConfig, cliArgs = []) {
492250
492297
  );
492251
492298
  }
492252
492299
  const profile = process.env["SEATBELT_PROFILE"] ??= "permissive-open";
492253
- let profileFile = fileURLToPath19(
492300
+ let profileFile = fileURLToPath18(
492254
492301
  new URL(`sandbox-macos-${profile}.sb`, import.meta.url)
492255
492302
  );
492256
492303
  if (!BUILTIN_SEATBELT_PROFILES.includes(profile)) {
@@ -492990,9 +493037,9 @@ __name(validateNonInteractiveAuth, "validateNonInteractiveAuth");
492990
493037
 
492991
493038
  // packages/cli/src/ui/components/StandaloneSessionPicker.tsx
492992
493039
  init_esbuild_shims();
492993
- var import_react181 = __toESM(require_react(), 1);
493040
+ var import_react182 = __toESM(require_react(), 1);
492994
493041
  init_dist4();
492995
- var import_jsx_runtime144 = __toESM(require_jsx_runtime(), 1);
493042
+ var import_jsx_runtime145 = __toESM(require_jsx_runtime(), 1);
492996
493043
  var PREVIEW_CONFIG_STUB = {
492997
493044
  getShouldUseNodePtyShell: /* @__PURE__ */ __name(() => false, "getShouldUseNodePtyShell"),
492998
493045
  getIdeMode: /* @__PURE__ */ __name(() => false, "getIdeMode"),
@@ -493011,15 +493058,15 @@ function StandalonePickerScreen({
493011
493058
  initialSessions
493012
493059
  }) {
493013
493060
  const { exit } = use_app_default();
493014
- const [isExiting, setIsExiting] = (0, import_react181.useState)(false);
493061
+ const [isExiting, setIsExiting] = (0, import_react182.useState)(false);
493015
493062
  const handleExit = /* @__PURE__ */ __name(() => {
493016
493063
  setIsExiting(true);
493017
493064
  exit();
493018
493065
  }, "handleExit");
493019
493066
  if (isExiting) {
493020
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Box_default, {});
493067
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Box_default, {});
493021
493068
  }
493022
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(ConfigContext.Provider, { value: PREVIEW_CONFIG_STUB, children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(SettingsContext.Provider, { value: PREVIEW_SETTINGS_STUB, children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
493069
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(ConfigContext.Provider, { value: PREVIEW_CONFIG_STUB, children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(SettingsContext.Provider, { value: PREVIEW_SETTINGS_STUB, children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
493023
493070
  SessionPicker,
493024
493071
  {
493025
493072
  sessionService,
@@ -493060,12 +493107,12 @@ async function showResumeSessionPicker(cwd6 = process.cwd(), initialSessions) {
493060
493107
  return new Promise((resolve38) => {
493061
493108
  let selectedId;
493062
493109
  const { unmount, waitUntilExit } = render_default(
493063
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
493110
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
493064
493111
  KeypressProvider,
493065
493112
  {
493066
493113
  kittyProtocolEnabled: false,
493067
493114
  pasteWorkaround: process.platform === "win32" || parseInt(process.versions.node.split(".")[0], 10) < 20,
493068
- children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
493115
+ children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
493069
493116
  StandalonePickerScreen,
493070
493117
  {
493071
493118
  sessionService,
@@ -496116,7 +496163,7 @@ var QwenAgent = class {
496116
496163
  async initialize(args2) {
496117
496164
  this.clientCapabilities = args2.clientCapabilities;
496118
496165
  const authMethods = buildAuthMethods();
496119
- const version2 = "0.40.0";
496166
+ const version2 = "0.41.0";
496120
496167
  return {
496121
496168
  protocolVersion: PROTOCOL_VERSION,
496122
496169
  agentInfo: {
@@ -496769,7 +496816,7 @@ function installSynchronizedOutput(stdout3 = process.stdout, env5 = process.env)
496769
496816
  __name(installSynchronizedOutput, "installSynchronizedOutput");
496770
496817
 
496771
496818
  // packages/cli/src/gemini.tsx
496772
- var import_jsx_runtime145 = __toESM(require_jsx_runtime(), 1);
496819
+ var import_jsx_runtime146 = __toESM(require_jsx_runtime(), 1);
496773
496820
  var debugLogger167 = createDebugLogger("STARTUP");
496774
496821
  function validateDnsResolutionOrder(order) {
496775
496822
  const defaultValue = "ipv4first";
@@ -496838,14 +496885,14 @@ async function startInteractiveUI(config2, settings2, startupWarnings, workspace
496838
496885
  const AppWrapper = /* @__PURE__ */ __name(() => {
496839
496886
  const kittyProtocolStatus = useKittyKeyboardProtocol();
496840
496887
  const nodeMajorVersion = parseInt(process.versions.node.split(".")[0], 10);
496841
- return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(SettingsContext.Provider, { value: settings2, children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
496888
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(SettingsContext.Provider, { value: settings2, children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
496842
496889
  KeypressProvider,
496843
496890
  {
496844
496891
  kittyProtocolEnabled: kittyProtocolStatus.enabled,
496845
496892
  config: config2,
496846
496893
  debugKeystrokeLogging: settings2.merged.general?.debugKeystrokeLogging,
496847
496894
  pasteWorkaround: process.platform === "win32" || nodeMajorVersion < 20,
496848
- children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(SessionStatsProvider, { sessionId: config2.getSessionId(), children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(VimModeProvider, { settings: settings2, children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(AgentViewProvider, { config: config2, children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
496895
+ children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(SessionStatsProvider, { sessionId: config2.getSessionId(), children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(VimModeProvider, { settings: settings2, children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(AgentViewProvider, { config: config2, children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
496849
496896
  AppContainer,
496850
496897
  {
496851
496898
  config: config2,
@@ -496859,7 +496906,7 @@ async function startInteractiveUI(config2, settings2, startupWarnings, workspace
496859
496906
  ) });
496860
496907
  }, "AppWrapper");
496861
496908
  const instance2 = render_default(
496862
- process.env["DEBUG"] ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_react182.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(AppWrapper, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(AppWrapper, {}),
496909
+ process.env["DEBUG"] ? /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_react183.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(AppWrapper, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(AppWrapper, {}),
496863
496910
  {
496864
496911
  exitOnCtrlC: false,
496865
496912
  patchConsole: false,