@protolabsai/proto 0.40.0 → 0.45.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.45.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) {
@@ -170846,7 +170845,7 @@ function buildSystemPromptSuffix(text) {
170846
170845
 
170847
170846
  ${trimmed2}` : "";
170848
170847
  }
170849
- function getCoreSystemPrompt(userMemory, model, appendInstruction) {
170848
+ function getCoreSystemPrompt(userMemory, model, appendInstruction, interactive = false) {
170850
170849
  let systemMdEnabled = false;
170851
170850
  let systemMdPath = path20.resolve(path20.join(QWEN_CONFIG_DIR, "system.md"));
170852
170851
  const systemMdResolution = resolvePathFromEnv(process3.env["QWEN_SYSTEM_MD"]);
@@ -171110,23 +171109,38 @@ Workspace: ${parts2} files
171110
171109
  }
171111
171110
  }()}
171112
171111
 
171113
- ${getToolCallExamples(model || "")}
171114
-
171115
171112
  ${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 "";
171113
+ if (!interactive)
171114
+ return "";
171115
+ if (!fs22.existsSync(path20.join(process3.cwd(), ".beads")))
171116
+ return "";
171117
+ return `
171118
+ # Beads (cross-session task tracker)
171119
+
171120
+ This workspace uses [beads_rust](https://github.com/Dicklesworthstone/beads_rust) (\`br\`). The ${ToolNames.TASK_CREATE} / ${ToolNames.TASK_UPDATE} tools you already use are backed by it, so every task you create persists to \`.beads/\` and survives across sessions on this machine.
171121
+
171122
+ Before inventing new tasks for a request, check for pre-existing work:
171123
+
171124
+ - \`br ready --json\` \u2014 actionable issues with no blockers; pick from here first
171125
+ - \`br list --status open --sort priority --json\` \u2014 full open list
171126
+ - \`br show <id> --json\` \u2014 details of a specific issue
171127
+
171128
+ When you take pre-existing work:
171129
+
171130
+ - \`br update --actor "\${BR_ACTOR:-assistant}" <id> --status in_progress --claim\`
171131
+ - \`br close --actor "\${BR_ACTOR:-assistant}" <id> --reason "evidence: <commit/PR/file>"\`
171132
+
171133
+ \`.beads/\` may be gitignored \u2014 check before running \`git add .beads/\`. When it IS tracked, sync to git after updates so other machines/agents see the changes:
171134
+
171135
+ - \`br sync --flush-only\` exports the DB to JSONL
171136
+ - \`git add .beads/ && git commit -m "<message>"\` \u2014 beads NEVER auto-commits; that's your job
171137
+
171138
+ Never run bare \`bv\` \u2014 it launches an interactive TUI and blocks the session. Use \`bv --robot-next\`, \`bv --robot-triage\`, etc. if you need it at all.
171139
+ `;
171128
171140
  }()}
171129
171141
 
171142
+ ${getToolCallExamples(model || "")}
171143
+
171130
171144
  # Final Reminder
171131
171145
  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
171146
  `.trim();
@@ -185594,9 +185608,9 @@ ${JSON.stringify(symbolNames, null, 2)}`);
185594
185608
  // packages/core/dist/src/utils/shellAstParser.js
185595
185609
  import fs25 from "node:fs";
185596
185610
  import path26 from "node:path";
185597
- import { fileURLToPath as fileURLToPath3 } from "node:url";
185611
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
185598
185612
  function resolveWasmPath(filename) {
185599
- const rawPath = fileURLToPath3(import.meta.url);
185613
+ const rawPath = fileURLToPath2(import.meta.url);
185600
185614
  if (rawPath.includes(path26.join("src", "utils"))) {
185601
185615
  const levelsUp = rawPath.endsWith(".ts") ? 2 : 3;
185602
185616
  return path26.join(path26.dirname(rawPath), ...Array(levelsUp).fill(".."), "vendor", "tree-sitter", filename);
@@ -197824,7 +197838,14 @@ ${blocks}`;
197824
197838
  { volatility: "run", content: blockerNote }
197825
197839
  ]);
197826
197840
  }
197827
- const corePrompt = getCoreSystemPrompt(userMemory, this.config.getModel(), appendSystemPrompt);
197841
+ const corePrompt = getCoreSystemPrompt(
197842
+ userMemory,
197843
+ this.config.getModel(),
197844
+ appendSystemPrompt,
197845
+ // Optional-chain so test mocks that don't stub isInteractive() still
197846
+ // pass; production Config always implements it.
197847
+ this.config.isInteractive?.() ?? false
197848
+ );
197828
197849
  return assemblePromptSections([
197829
197850
  { volatility: "stable", content: corePrompt.staticPrefix },
197830
197851
  { volatility: "workspace", content: corePrompt.dynamicSuffix },
@@ -203088,7 +203109,7 @@ var init_esm9 = __esm({
203088
203109
 
203089
203110
  // node_modules/path-scurry/dist/esm/index.js
203090
203111
  import { posix, win32 } from "node:path";
203091
- import { fileURLToPath as fileURLToPath4 } from "node:url";
203112
+ import { fileURLToPath as fileURLToPath3 } from "node:url";
203092
203113
  import { lstatSync, readdir as readdirCB, readdirSync, readlinkSync, realpathSync as rps } from "fs";
203093
203114
  import * as actualFS from "node:fs";
203094
203115
  import { lstat, readdir as readdir3, readlink, realpath } from "node:fs/promises";
@@ -204235,7 +204256,7 @@ var init_esm10 = __esm({
204235
204256
  constructor(cwd6 = process.cwd(), pathImpl, sep12, { nocase, childrenCacheSize = 16 * 1024, fs: fs140 = defaultFS } = {}) {
204236
204257
  this.#fs = fsFromOption(fs140);
204237
204258
  if (cwd6 instanceof URL || cwd6.startsWith("file://")) {
204238
- cwd6 = fileURLToPath4(cwd6);
204259
+ cwd6 = fileURLToPath3(cwd6);
204239
204260
  }
204240
204261
  const cwdPath = pathImpl.resolve(cwd6);
204241
204262
  this.roots = /* @__PURE__ */ Object.create(null);
@@ -205709,7 +205730,7 @@ var init_walker = __esm({
205709
205730
  });
205710
205731
 
205711
205732
  // node_modules/glob/dist/esm/glob.js
205712
- import { fileURLToPath as fileURLToPath5 } from "node:url";
205733
+ import { fileURLToPath as fileURLToPath4 } from "node:url";
205713
205734
  var defaultPlatform3, Glob;
205714
205735
  var init_glob = __esm({
205715
205736
  "node_modules/glob/dist/esm/glob.js"() {
@@ -205781,7 +205802,7 @@ var init_glob = __esm({
205781
205802
  if (!opts.cwd) {
205782
205803
  this.cwd = "";
205783
205804
  } else if (opts.cwd instanceof URL || opts.cwd.startsWith("file://")) {
205784
- opts.cwd = fileURLToPath5(opts.cwd);
205805
+ opts.cwd = fileURLToPath4(opts.cwd);
205785
205806
  }
205786
205807
  this.cwd = opts.cwd || "";
205787
205808
  this.root = opts.root;
@@ -232880,7 +232901,7 @@ ${directoryContent}`;
232880
232901
 
232881
232902
  // packages/core/dist/src/utils/ripgrepUtils.js
232882
232903
  import path49 from "node:path";
232883
- import { fileURLToPath as fileURLToPath6 } from "node:url";
232904
+ import { fileURLToPath as fileURLToPath5 } from "node:url";
232884
232905
  import { execFile as execFile4 } from "node:child_process";
232885
232906
  function wslTimeout() {
232886
232907
  return process.platform === "linux" && process.env["WSL_INTEROP"] ? RIPGREP_WSL_TIMEOUT_MS : RIPGREP_RUN_TIMEOUT_MS;
@@ -233048,7 +233069,7 @@ var init_ripgrepUtils = __esm({
233048
233069
  cachedHealth = null;
233049
233070
  macSigningAttempted = false;
233050
233071
  __name(wslTimeout, "wslTimeout");
233051
- __filename2 = fileURLToPath6(import.meta.url);
233072
+ __filename2 = fileURLToPath5(import.meta.url);
233052
233073
  __dirname2 = path49.dirname(__filename2);
233053
233074
  __name(getPlatformString, "getPlatformString");
233054
233075
  __name(getArchitectureString, "getArchitectureString");
@@ -244894,7 +244915,7 @@ var init_write_file = __esm({
244894
244915
 
244895
244916
  // packages/core/dist/src/tools/lsp.js
244896
244917
  import path55 from "node:path";
244897
- import { fileURLToPath as fileURLToPath7, pathToFileURL as pathToFileURL2 } from "node:url";
244918
+ import { fileURLToPath as fileURLToPath6, pathToFileURL as pathToFileURL2 } from "node:url";
244898
244919
  var LOCATION_REQUIRED_OPERATIONS, FILE_REQUIRED_OPERATIONS, QUERY_REQUIRED_OPERATIONS, ITEM_REQUIRED_OPERATIONS, RANGE_REQUIRED_OPERATIONS, LspToolInvocation, LspTool;
244899
244920
  var init_lsp = __esm({
244900
244921
  "packages/core/dist/src/tools/lsp.js"() {
@@ -245447,7 +245468,7 @@ ${fileLabel}${serverSuffix}:`);
245447
245468
  const start2 = location.range.start;
245448
245469
  let filePath = location.uri;
245449
245470
  if (filePath.startsWith("file://")) {
245450
- filePath = fileURLToPath7(filePath);
245471
+ filePath = fileURLToPath6(filePath);
245451
245472
  filePath = path55.relative(workspaceRoot, filePath) || ".";
245452
245473
  }
245453
245474
  const serverSuffix = location.serverName && location.serverName !== "" ? ` [${location.serverName}]` : "";
@@ -245457,7 +245478,7 @@ ${fileLabel}${serverSuffix}:`);
245457
245478
  const { uri, range } = location;
245458
245479
  let filePath = uri;
245459
245480
  if (uri.startsWith("file://")) {
245460
- filePath = fileURLToPath7(uri);
245481
+ filePath = fileURLToPath6(uri);
245461
245482
  filePath = path55.relative(workspaceRoot, filePath) || ".";
245462
245483
  }
245463
245484
  const line = (range.start.line ?? 0) + 1;
@@ -245490,7 +245511,7 @@ ${fileLabel}${serverSuffix}:`);
245490
245511
  formatUriForDisplay(uri, workspaceRoot) {
245491
245512
  let filePath = uri;
245492
245513
  if (uri.startsWith("file://")) {
245493
- filePath = fileURLToPath7(uri);
245514
+ filePath = fileURLToPath6(uri);
245494
245515
  }
245495
245516
  if (path55.isAbsolute(filePath)) {
245496
245517
  return path55.relative(workspaceRoot, filePath) || ".";
@@ -249010,7 +249031,7 @@ import * as fs51 from "fs/promises";
249010
249031
  import * as fsSync from "fs";
249011
249032
  import * as path60 from "path";
249012
249033
  import * as os17 from "os";
249013
- import { fileURLToPath as fileURLToPath8 } from "url";
249034
+ import { fileURLToPath as fileURLToPath7 } from "url";
249014
249035
  function watcherIgnored(filePath, stats) {
249015
249036
  if (stats && !stats.isFile() && !stats.isDirectory())
249016
249037
  return true;
@@ -249048,7 +249069,7 @@ var init_skill_manager = __esm({
249048
249069
  bundledSkillsDir;
249049
249070
  constructor(config2) {
249050
249071
  this.config = config2;
249051
- this.bundledSkillsDir = path60.join(path60.dirname(fileURLToPath8(import.meta.url)), "bundled");
249072
+ this.bundledSkillsDir = path60.join(path60.dirname(fileURLToPath7(import.meta.url)), "bundled");
249052
249073
  }
249053
249074
  /**
249054
249075
  * Adds a listener that will be called when skills change.
@@ -271749,10 +271770,16 @@ var init_task_store = __esm({
271749
271770
  // Fallback in-memory store when br is not installed.
271750
271771
  fallbackTasks = null;
271751
271772
  fallbackPath;
271752
- constructor(runtimeDir, _sessionId, cwd6) {
271773
+ /**
271774
+ * @param interactive Only when true does this store shell out to `br` and
271775
+ * persist tasks into the shared `.beads/` queue. SDK / headless / CI
271776
+ * sessions stay on the per-session in-memory fallback so they don't
271777
+ * pollute the team-shared queue with ephemeral work.
271778
+ */
271779
+ constructor(runtimeDir, _sessionId, cwd6, interactive = false) {
271753
271780
  this.cwd = cwd6 ?? process.cwd();
271754
271781
  this.fallbackPath = path79.join(runtimeDir, "tasks", `${_sessionId}.json`);
271755
- this.brAvailable = this.detectBr();
271782
+ this.brAvailable = interactive && this.detectBr();
271756
271783
  if (this.brAvailable) {
271757
271784
  this.ensureInit();
271758
271785
  } else {
@@ -275981,7 +276008,14 @@ var init_config3 = __esm({
275981
276008
  }
275982
276009
  getTaskStore() {
275983
276010
  if (!this.taskStore) {
275984
- this.taskStore = new TaskStore(Storage.getRuntimeBaseDir(), this.getSessionId(), this.targetDir);
276011
+ this.taskStore = new TaskStore(
276012
+ Storage.getRuntimeBaseDir(),
276013
+ this.getSessionId(),
276014
+ this.targetDir,
276015
+ // Only interactive REPL sessions write to the shared `.beads/` queue;
276016
+ // SDK / headless / CI sessions stay on the per-session in-memory store.
276017
+ this.isInteractive?.() ?? false
276018
+ );
275985
276019
  }
275986
276020
  return this.taskStore;
275987
276021
  }
@@ -280795,7 +280829,7 @@ var init_NativeLspClient = __esm({
280795
280829
 
280796
280830
  // packages/core/dist/src/lsp/NativeLspService.js
280797
280831
  import * as path91 from "path";
280798
- import { fileURLToPath as fileURLToPath9, pathToFileURL as pathToFileURL5 } from "url";
280832
+ import { fileURLToPath as fileURLToPath8, pathToFileURL as pathToFileURL5 } from "url";
280799
280833
  import * as fs84 from "node:fs";
280800
280834
  var debugLogger91, LANGUAGE_ID_TO_EXTENSIONS, DEFAULT_EXCLUDE_PATTERNS, NativeLspService;
280801
280835
  var init_NativeLspService = __esm({
@@ -280924,7 +280958,7 @@ var init_NativeLspService = __esm({
280924
280958
  }
280925
280959
  let filePath;
280926
280960
  try {
280927
- filePath = fileURLToPath9(uri);
280961
+ filePath = fileURLToPath8(uri);
280928
280962
  } catch (error40) {
280929
280963
  debugLogger91.warn(`Failed to resolve file path for ${uri}:`, error40);
280930
280964
  return false;
@@ -281565,7 +281599,7 @@ var init_NativeLspService = __esm({
281565
281599
  * Apply text edits to a file
281566
281600
  */
281567
281601
  async applyTextEdits(uri, edits) {
281568
- let filePath = uri.startsWith("file://") ? fileURLToPath9(uri) : uri;
281602
+ let filePath = uri.startsWith("file://") ? fileURLToPath8(uri) : uri;
281569
281603
  if (!path91.isAbsolute(filePath)) {
281570
281604
  filePath = path91.resolve(this.workspaceRoot, filePath);
281571
281605
  }
@@ -284671,7 +284705,7 @@ ${worktreeInfo}`);
284671
284705
  initialTask: this.arenaConfig?.task,
284672
284706
  runtimeConfig: {
284673
284707
  promptConfig: {
284674
- systemPrompt: getCoreSystemPrompt(this.config.getUserMemory(), model.modelId).full
284708
+ systemPrompt: getCoreSystemPrompt(this.config.getUserMemory(), model.modelId, void 0, this.config.isInteractive?.() ?? false).full
284675
284709
  },
284676
284710
  modelConfig: { model: model.modelId },
284677
284711
  runConfig: {
@@ -313371,7 +313405,7 @@ var require_backend = __commonJS({
313371
313405
  });
313372
313406
  return a2._currentValue;
313373
313407
  }, "useContext"),
313374
- useEffect: /* @__PURE__ */ __name(function useEffect77(a2) {
313408
+ useEffect: /* @__PURE__ */ __name(function useEffect78(a2) {
313375
313409
  C3();
313376
313410
  x3.push({
313377
313411
  primitive: "Effect",
@@ -313448,7 +313482,7 @@ var require_backend = __commonJS({
313448
313482
  });
313449
313483
  return a2;
313450
313484
  }, "useRef"),
313451
- useState: /* @__PURE__ */ __name(function useState100(a2) {
313485
+ useState: /* @__PURE__ */ __name(function useState101(a2) {
313452
313486
  var b2 = C3();
313453
313487
  a2 = null !== b2 ? b2.memoizedState : "function" === typeof a2 ? a2() : a2;
313454
313488
  x3.push({
@@ -405795,7 +405829,7 @@ var measureElement = /* @__PURE__ */ __name((node) => ({
405795
405829
  var measure_element_default = measureElement;
405796
405830
 
405797
405831
  // packages/cli/src/gemini.tsx
405798
- var import_react182 = __toESM(require_react(), 1);
405832
+ var import_react183 = __toESM(require_react(), 1);
405799
405833
  import dns2 from "node:dns";
405800
405834
  import os50 from "node:os";
405801
405835
  import { basename as basename32 } from "node:path";
@@ -408538,7 +408572,7 @@ import * as fs97 from "node:fs";
408538
408572
  init_esbuild_shims();
408539
408573
  import * as fs95 from "node:fs";
408540
408574
  import * as path104 from "node:path";
408541
- import { fileURLToPath as fileURLToPath10, pathToFileURL as pathToFileURL6 } from "node:url";
408575
+ import { fileURLToPath as fileURLToPath9, pathToFileURL as pathToFileURL6 } from "node:url";
408542
408576
  import { homedir as homedir11 } from "node:os";
408543
408577
 
408544
408578
  // import("./locales/**/*.js") in packages/cli/src/i18n/index.ts
@@ -408558,7 +408592,7 @@ var translations = {};
408558
408592
  var translationCache = {};
408559
408593
  var loadingPromises = {};
408560
408594
  var getBuiltinLocalesDir = /* @__PURE__ */ __name(() => {
408561
- const __filename5 = fileURLToPath10(import.meta.url);
408595
+ const __filename5 = fileURLToPath9(import.meta.url);
408562
408596
  return path104.join(path104.dirname(__filename5), "locales");
408563
408597
  }, "getBuiltinLocalesDir");
408564
408598
  var getUserLocalesDir = /* @__PURE__ */ __name(() => path104.join(homedir11(), ".qwen", "locales"), "getUserLocalesDir");
@@ -411503,7 +411537,7 @@ __name(sync_default, "default");
411503
411537
  // node_modules/yargs/lib/platform-shims/esm.mjs
411504
411538
  import { inspect as inspect2 } from "util";
411505
411539
  import { readFileSync as readFileSync27 } from "fs";
411506
- import { fileURLToPath as fileURLToPath11 } from "url";
411540
+ import { fileURLToPath as fileURLToPath10 } from "url";
411507
411541
 
411508
411542
  // node_modules/yargs-parser/build/lib/index.js
411509
411543
  init_esbuild_shims();
@@ -412780,7 +412814,7 @@ var REQUIRE_ERROR = "require is not supported by ESM";
412780
412814
  var REQUIRE_DIRECTORY_ERROR = "loading a directory of commands is not supported yet for ESM";
412781
412815
  var __dirname3;
412782
412816
  try {
412783
- __dirname3 = fileURLToPath11(import.meta.url);
412817
+ __dirname3 = fileURLToPath10(import.meta.url);
412784
412818
  } catch (e4) {
412785
412819
  __dirname3 = process.cwd();
412786
412820
  }
@@ -416355,8 +416389,8 @@ var linkCommand = {
416355
416389
  init_esbuild_shims();
416356
416390
  import { access as access10, cp as cp2, mkdir as mkdir18, readdir as readdir13, writeFile as writeFile16 } from "node:fs/promises";
416357
416391
  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);
416392
+ import { fileURLToPath as fileURLToPath11 } from "node:url";
416393
+ var __filename3 = fileURLToPath11(import.meta.url);
416360
416394
  var __dirname4 = dirname34(__filename3);
416361
416395
  var EXAMPLES_PATH = join50(__dirname4, "examples");
416362
416396
  async function pathExists(path151) {
@@ -417929,9 +417963,9 @@ import path110 from "node:path";
417929
417963
  init_esbuild_shims();
417930
417964
  import process20 from "node:process";
417931
417965
  import fsPromises3 from "node:fs/promises";
417932
- import { fileURLToPath as fileURLToPath13 } from "node:url";
417966
+ import { fileURLToPath as fileURLToPath12 } from "node:url";
417933
417967
  import path108 from "node:path";
417934
- var toPath = /* @__PURE__ */ __name((urlOrPath) => urlOrPath instanceof URL ? fileURLToPath13(urlOrPath) : urlOrPath, "toPath");
417968
+ var toPath = /* @__PURE__ */ __name((urlOrPath) => urlOrPath instanceof URL ? fileURLToPath12(urlOrPath) : urlOrPath, "toPath");
417935
417969
  async function findUp(name4, {
417936
417970
  cwd: cwd6 = process20.cwd(),
417937
417971
  type = "file",
@@ -418093,9 +418127,9 @@ var import_normalize_package_data = __toESM(require_normalize2(), 1);
418093
418127
 
418094
418128
  // node_modules/unicorn-magic/node.js
418095
418129
  init_esbuild_shims();
418096
- import { fileURLToPath as fileURLToPath14 } from "node:url";
418130
+ import { fileURLToPath as fileURLToPath13 } from "node:url";
418097
418131
  function toPath2(urlOrPath) {
418098
- return urlOrPath instanceof URL ? fileURLToPath14(urlOrPath) : urlOrPath;
418132
+ return urlOrPath instanceof URL ? fileURLToPath13(urlOrPath) : urlOrPath;
418099
418133
  }
418100
418134
  __name(toPath2, "toPath");
418101
418135
 
@@ -418128,9 +418162,9 @@ async function readPackageUp(options2) {
418128
418162
  __name(readPackageUp, "readPackageUp");
418129
418163
 
418130
418164
  // packages/cli/src/utils/package.ts
418131
- import { fileURLToPath as fileURLToPath15 } from "node:url";
418165
+ import { fileURLToPath as fileURLToPath14 } from "node:url";
418132
418166
  import path111 from "node:path";
418133
- var __filename4 = fileURLToPath15(import.meta.url);
418167
+ var __filename4 = fileURLToPath14(import.meta.url);
418134
418168
  var __dirname5 = path111.dirname(__filename4);
418135
418169
  var packageJson;
418136
418170
  async function getPackageJson() {
@@ -418149,7 +418183,7 @@ __name(getPackageJson, "getPackageJson");
418149
418183
  // packages/cli/src/utils/version.ts
418150
418184
  async function getCliVersion() {
418151
418185
  const pkgJson = await getPackageJson();
418152
- return "0.40.0";
418186
+ return "0.45.0";
418153
418187
  }
418154
418188
  __name(getCliVersion, "getCliVersion");
418155
418189
 
@@ -426157,7 +426191,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
426157
426191
 
426158
426192
  // packages/cli/src/generated/git-commit.ts
426159
426193
  init_esbuild_shims();
426160
- var GIT_COMMIT_INFO = "23880d90c";
426194
+ var GIT_COMMIT_INFO = "7986bbcce";
426161
426195
 
426162
426196
  // packages/cli/src/utils/systemInfo.ts
426163
426197
  async function getNpmVersion() {
@@ -427002,7 +427036,7 @@ init_esbuild_shims();
427002
427036
  import process29 from "node:process";
427003
427037
  import { Buffer as Buffer5 } from "node:buffer";
427004
427038
  import path114 from "node:path";
427005
- import { fileURLToPath as fileURLToPath16 } from "node:url";
427039
+ import { fileURLToPath as fileURLToPath15 } from "node:url";
427006
427040
  import { promisify as promisify8 } from "node:util";
427007
427041
  import childProcess from "node:child_process";
427008
427042
  import fs107, { constants as fsConstants3 } from "node:fs/promises";
@@ -427262,7 +427296,7 @@ __name(defaultBrowser2, "defaultBrowser");
427262
427296
 
427263
427297
  // node_modules/open/index.js
427264
427298
  var execFile12 = promisify8(childProcess.execFile);
427265
- var __dirname6 = path114.dirname(fileURLToPath16(import.meta.url));
427299
+ var __dirname6 = path114.dirname(fileURLToPath15(import.meta.url));
427266
427300
  var localXdgOpenPath = path114.join(__dirname6, "xdg-open");
427267
427301
  var { platform: platform11, arch: arch2 } = process29;
427268
427302
  async function getWindowsDefaultBrowserFromWsl() {
@@ -441012,7 +441046,7 @@ __name(runNonInteractiveStreamJson, "runNonInteractiveStreamJson");
441012
441046
 
441013
441047
  // packages/cli/src/ui/AppContainer.tsx
441014
441048
  init_esbuild_shims();
441015
- var import_react179 = __toESM(require_react(), 1);
441049
+ var import_react180 = __toESM(require_react(), 1);
441016
441050
 
441017
441051
  // packages/cli/src/ui/App.tsx
441018
441052
  init_esbuild_shims();
@@ -476449,7 +476483,7 @@ var DialogManager = /* @__PURE__ */ __name(({
476449
476483
 
476450
476484
  // packages/cli/src/ui/components/Composer.tsx
476451
476485
  init_esbuild_shims();
476452
- var import_react126 = __toESM(require_react(), 1);
476486
+ var import_react127 = __toESM(require_react(), 1);
476453
476487
 
476454
476488
  // packages/cli/src/ui/components/LoadingIndicator.tsx
476455
476489
  init_esbuild_shims();
@@ -479532,8 +479566,64 @@ var VoiceMicButton = /* @__PURE__ */ __name(() => {
479532
479566
  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
479567
  }, "VoiceMicButton");
479534
479568
 
479535
- // packages/cli/src/ui/components/Footer.tsx
479569
+ // packages/cli/src/ui/components/GoalPill.tsx
479570
+ init_esbuild_shims();
479536
479571
  var import_jsx_runtime128 = __toESM(require_jsx_runtime(), 1);
479572
+ var MAX_CONDITION_DISPLAY = 30;
479573
+ var GoalPill = /* @__PURE__ */ __name(({
479574
+ snapshot
479575
+ }) => {
479576
+ const label = truncate9(snapshot.condition, MAX_CONDITION_DISPLAY);
479577
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(Text3, { color: theme.status.warning, children: [
479578
+ "\u25CE ",
479579
+ label,
479580
+ " \xB7 T",
479581
+ snapshot.turnCount
479582
+ ] });
479583
+ }, "GoalPill");
479584
+ function truncate9(s5, max) {
479585
+ if (s5.length <= max) return s5;
479586
+ if (max <= 1) return "\u2026".slice(0, max);
479587
+ return `${s5.slice(0, max - 1)}\u2026`;
479588
+ }
479589
+ __name(truncate9, "truncate");
479590
+
479591
+ // packages/cli/src/ui/hooks/useGoalStatus.ts
479592
+ init_esbuild_shims();
479593
+ var import_react125 = __toESM(require_react(), 1);
479594
+ function useGoalStatus(config2) {
479595
+ const [snapshot, setSnapshot] = (0, import_react125.useState)(null);
479596
+ (0, import_react125.useEffect)(() => {
479597
+ if (!config2) return;
479598
+ const manager = config2.getGoalManager?.();
479599
+ if (!manager) return;
479600
+ const tick = /* @__PURE__ */ __name(() => {
479601
+ const active = manager.getActiveGoal();
479602
+ if (!active) {
479603
+ setSnapshot((prev) => prev === null ? prev : null);
479604
+ return;
479605
+ }
479606
+ setSnapshot((prev) => {
479607
+ if (prev !== null && prev.condition === active.condition && prev.turnCount === active.turnCount && prev.startedAt === active.startedAt) {
479608
+ return prev;
479609
+ }
479610
+ return {
479611
+ condition: active.condition,
479612
+ turnCount: active.turnCount,
479613
+ startedAt: active.startedAt
479614
+ };
479615
+ });
479616
+ }, "tick");
479617
+ tick();
479618
+ const id = setInterval(tick, 500);
479619
+ return () => clearInterval(id);
479620
+ }, [config2]);
479621
+ return snapshot;
479622
+ }
479623
+ __name(useGoalStatus, "useGoalStatus");
479624
+
479625
+ // packages/cli/src/ui/components/Footer.tsx
479626
+ var import_jsx_runtime129 = __toESM(require_jsx_runtime(), 1);
479537
479627
  var Footer = /* @__PURE__ */ __name(() => {
479538
479628
  const uiState = useUIState();
479539
479629
  const config2 = useConfig();
@@ -479548,18 +479638,19 @@ var Footer = /* @__PURE__ */ __name(() => {
479548
479638
  const sandboxInfo = sandboxEnv ? sandboxEnv === "sandbox-exec" ? "seatbelt" : sandboxEnv.startsWith("qwen-code") ? "docker" : sandboxEnv : null;
479549
479639
  const debugMode = config2.getDebugMode();
479550
479640
  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: [
479641
+ const goalStatus = useGoalStatus(config2);
479642
+ 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
479643
  t4("? for shortcuts"),
479553
479644
  " \xB7 ",
479554
479645
  t4("Esc\xD72: rewind")
479555
479646
  ] });
479556
479647
  const rightItems = [
479557
- { key: "voice", node: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(VoiceMicButton, {}) }
479648
+ { key: "voice", node: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(VoiceMicButton, {}) }
479558
479649
  ];
479559
479650
  if (sandboxInfo) {
479560
479651
  rightItems.push({
479561
479652
  key: "sandbox",
479562
- node: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(Text3, { color: theme.status.success, children: [
479653
+ node: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(Text3, { color: theme.status.success, children: [
479563
479654
  "\u{1F512} ",
479564
479655
  sandboxInfo
479565
479656
  ] })
@@ -479568,13 +479659,13 @@ var Footer = /* @__PURE__ */ __name(() => {
479568
479659
  if (debugMode) {
479569
479660
  rightItems.push({
479570
479661
  key: "debug",
479571
- node: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Text3, { color: theme.status.warning, children: "Debug Mode" })
479662
+ node: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Text3, { color: theme.status.warning, children: "Debug Mode" })
479572
479663
  });
479573
479664
  }
479574
479665
  if (promptTokenCount > 0 && contextWindowSize) {
479575
479666
  rightItems.push({
479576
479667
  key: "context",
479577
- node: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Text3, { color: theme.text.accent, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
479668
+ node: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Text3, { color: theme.text.accent, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
479578
479669
  ContextUsageDisplay,
479579
479670
  {
479580
479671
  promptTokenCount,
@@ -479584,7 +479675,13 @@ var Footer = /* @__PURE__ */ __name(() => {
479584
479675
  ) })
479585
479676
  });
479586
479677
  }
479587
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
479678
+ if (goalStatus) {
479679
+ rightItems.push({
479680
+ key: "goal",
479681
+ node: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(GoalPill, { snapshot: goalStatus })
479682
+ });
479683
+ }
479684
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
479588
479685
  Box_default,
479589
479686
  {
479590
479687
  justifyContent: "space-between",
@@ -479592,7 +479689,7 @@ var Footer = /* @__PURE__ */ __name(() => {
479592
479689
  flexDirection: "row",
479593
479690
  alignItems: "center",
479594
479691
  children: [
479595
- /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
479692
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
479596
479693
  Box_default,
479597
479694
  {
479598
479695
  marginLeft: 2,
@@ -479601,12 +479698,12 @@ var Footer = /* @__PURE__ */ __name(() => {
479601
479698
  alignItems: isNarrow ? "flex-start" : "center",
479602
479699
  children: [
479603
479700
  leftContent,
479604
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(MCPHealthPill, {})
479701
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(MCPHealthPill, {})
479605
479702
  ]
479606
479703
  }
479607
479704
  ),
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: " | " }),
479705
+ /* @__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: [
479706
+ index > 0 && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Text3, { color: theme.text.secondary, children: " | " }),
479610
479707
  node
479611
479708
  ] }, key)) })
479612
479709
  ]
@@ -479616,7 +479713,7 @@ var Footer = /* @__PURE__ */ __name(() => {
479616
479713
 
479617
479714
  // packages/cli/src/ui/components/QueuedMessageDisplay.tsx
479618
479715
  init_esbuild_shims();
479619
- var import_jsx_runtime129 = __toESM(require_jsx_runtime(), 1);
479716
+ var import_jsx_runtime130 = __toESM(require_jsx_runtime(), 1);
479620
479717
  var MAX_DISPLAYED_QUEUED_MESSAGES = 3;
479621
479718
  var QueuedMessageDisplay = /* @__PURE__ */ __name(({
479622
479719
  messageQueue
@@ -479626,20 +479723,20 @@ var QueuedMessageDisplay = /* @__PURE__ */ __name(({
479626
479723
  }
479627
479724
  const count = messageQueue.length;
479628
479725
  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" })
479726
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
479727
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(Box_default, { paddingLeft: 2, children: [
479728
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Text3, { color: "yellow", bold: true, children: label }),
479729
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Text3, { dimColor: true, children: " \u2014 will be seen at next tool call" })
479633
479730
  ] }),
479634
479731
  messageQueue.slice(0, MAX_DISPLAYED_QUEUED_MESSAGES).map((message, index) => {
479635
479732
  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: [
479733
+ 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
479734
  index + 1,
479638
479735
  ". ",
479639
479736
  preview
479640
479737
  ] }) }, index);
479641
479738
  }),
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: [
479739
+ 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
479740
  "... (+",
479644
479741
  count - MAX_DISPLAYED_QUEUED_MESSAGES,
479645
479742
  " more)"
@@ -479649,7 +479746,7 @@ var QueuedMessageDisplay = /* @__PURE__ */ __name(({
479649
479746
 
479650
479747
  // packages/cli/src/ui/components/KeyboardShortcuts.tsx
479651
479748
  init_esbuild_shims();
479652
- var import_jsx_runtime130 = __toESM(require_jsx_runtime(), 1);
479749
+ var import_jsx_runtime131 = __toESM(require_jsx_runtime(), 1);
479653
479750
  var getNewlineKey = /* @__PURE__ */ __name(() => process.platform === "win32" ? "ctrl+enter" : "ctrl+j", "getNewlineKey");
479654
479751
  var getPasteKey = /* @__PURE__ */ __name(() => {
479655
479752
  if (process.platform === "win32") return "alt+v";
@@ -479673,8 +479770,8 @@ var getShortcuts = /* @__PURE__ */ __name(() => [
479673
479770
  { key: getPasteKey(), description: t4("to paste images") },
479674
479771
  { key: getExternalEditorKey(), description: t4("for external editor") }
479675
479772
  ], "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 }),
479773
+ var ShortcutItem = /* @__PURE__ */ __name(({ shortcut }) => /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(Text3, { color: theme.text.secondary, children: [
479774
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Text3, { color: theme.text.accent, children: shortcut.key }),
479678
479775
  " ",
479679
479776
  shortcut.description
479680
479777
  ] }), "ShortcutItem");
@@ -479715,18 +479812,18 @@ var KeyboardShortcuts = /* @__PURE__ */ __name(() => {
479715
479812
  columns.push(shortcuts.slice(startIndex, startIndex + count));
479716
479813
  startIndex += count;
479717
479814
  }
479718
- return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
479815
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
479719
479816
  Box_default,
479720
479817
  {
479721
479818
  flexDirection: "row",
479722
479819
  marginLeft: MARGIN_LEFT,
479723
479820
  marginRight: MARGIN_RIGHT,
479724
- children: columns.map((column, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
479821
+ children: columns.map((column, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
479725
479822
  Box_default,
479726
479823
  {
479727
479824
  flexDirection: "column",
479728
479825
  marginRight: colIndex < numColumns - 1 ? COLUMN_GAP : 0,
479729
- children: column.map((shortcut) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ShortcutItem, { shortcut }, shortcut.key))
479826
+ children: column.map((shortcut) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ShortcutItem, { shortcut }, shortcut.key))
479730
479827
  },
479731
479828
  colIndex
479732
479829
  ))
@@ -479736,13 +479833,13 @@ var KeyboardShortcuts = /* @__PURE__ */ __name(() => {
479736
479833
 
479737
479834
  // packages/cli/src/ui/components/ConfigInitDisplay.tsx
479738
479835
  init_esbuild_shims();
479739
- var import_react125 = __toESM(require_react(), 1);
479836
+ var import_react126 = __toESM(require_react(), 1);
479740
479837
  init_dist4();
479741
- var import_jsx_runtime131 = __toESM(require_jsx_runtime(), 1);
479838
+ var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1);
479742
479839
  var ConfigInitDisplay = /* @__PURE__ */ __name(() => {
479743
479840
  const config2 = useConfig();
479744
- const [message, setMessage] = (0, import_react125.useState)(t4("Initializing..."));
479745
- (0, import_react125.useEffect)(() => {
479841
+ const [message, setMessage] = (0, import_react126.useState)(t4("Initializing..."));
479842
+ (0, import_react126.useEffect)(() => {
479746
479843
  const onChange = /* @__PURE__ */ __name((clients) => {
479747
479844
  if (!clients || clients.size === 0) {
479748
479845
  setMessage(t4("Initializing..."));
@@ -479766,15 +479863,15 @@ var ConfigInitDisplay = /* @__PURE__ */ __name(() => {
479766
479863
  appEvents.off("mcp-client-update", onChange);
479767
479864
  };
479768
479865
  }, [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, {}),
479866
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(Text3, { children: [
479867
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(GeminiSpinner, {}),
479771
479868
  " ",
479772
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Text3, { color: theme.text.primary, children: message })
479869
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Text3, { color: theme.text.primary, children: message })
479773
479870
  ] }) });
479774
479871
  }, "ConfigInitDisplay");
479775
479872
 
479776
479873
  // packages/cli/src/ui/components/Composer.tsx
479777
- var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1);
479874
+ var import_jsx_runtime133 = __toESM(require_jsx_runtime(), 1);
479778
479875
  var Composer = /* @__PURE__ */ __name(() => {
479779
479876
  const config2 = useConfig();
479780
479877
  const isScreenReaderEnabled = use_is_screen_reader_enabled_default();
@@ -479790,20 +479887,20 @@ var Composer = /* @__PURE__ */ __name(() => {
479790
479887
  { prompt: 0, candidates: 0 }
479791
479888
  );
479792
479889
  const taskTokens = tokens.candidates - taskStartTokens;
479793
- const [showShortcuts, setShowShortcuts] = (0, import_react126.useState)(false);
479794
- const handleToggleShortcuts = (0, import_react126.useCallback)(() => {
479890
+ const [showShortcuts, setShowShortcuts] = (0, import_react127.useState)(false);
479891
+ const handleToggleShortcuts = (0, import_react127.useCallback)(() => {
479795
479892
  setShowShortcuts((prev) => !prev);
479796
479893
  }, []);
479797
- const [showSuggestions, setShowSuggestions] = (0, import_react126.useState)(false);
479798
- const handleSuggestionsVisibilityChange = (0, import_react126.useCallback)(
479894
+ const [showSuggestions, setShowSuggestions] = (0, import_react127.useState)(false);
479895
+ const handleSuggestionsVisibilityChange = (0, import_react127.useCallback)(
479799
479896
  (visible) => {
479800
479897
  setShowSuggestions(visible);
479801
479898
  uiActions.onSuggestionsVisibilityChange(visible);
479802
479899
  },
479803
479900
  [uiActions]
479804
479901
  );
479805
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
479806
- !uiState.embeddedShellFocused && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
479902
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
479903
+ !uiState.embeddedShellFocused && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
479807
479904
  LoadingIndicator,
479808
479905
  {
479809
479906
  thought: uiState.streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ || config2.getAccessibility()?.enableLoadingPhrases === false ? void 0 : uiState.thought,
@@ -479812,10 +479909,10 @@ var Composer = /* @__PURE__ */ __name(() => {
479812
479909
  candidatesTokens: taskTokens
479813
479910
  }
479814
479911
  ),
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)(
479912
+ !uiState.isConfigInitialized && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(ConfigInitDisplay, {}),
479913
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(QueuedMessageDisplay, { messageQueue: uiState.messageQueue }),
479914
+ uiState.isFeedbackDialogOpen && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(FeedbackDialog, {}),
479915
+ uiState.isInputActive && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
479819
479916
  InputPrompt,
479820
479917
  {
479821
479918
  buffer: uiState.buffer,
@@ -479844,49 +479941,49 @@ var Composer = /* @__PURE__ */ __name(() => {
479844
479941
  onPromptSuggestionDismiss: uiState.dismissPromptSuggestion
479845
479942
  }
479846
479943
  ),
479847
- uiState.isInputActive && !showSuggestions && (showShortcuts ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(KeyboardShortcuts, {}) : !isScreenReaderEnabled && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Footer, {}))
479944
+ uiState.isInputActive && !showSuggestions && (showShortcuts ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(KeyboardShortcuts, {}) : !isScreenReaderEnabled && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Footer, {}))
479848
479945
  ] });
479849
479946
  }, "Composer");
479850
479947
 
479851
479948
  // packages/cli/src/ui/components/ExitWarning.tsx
479852
479949
  init_esbuild_shims();
479853
- var import_jsx_runtime133 = __toESM(require_jsx_runtime(), 1);
479950
+ var import_jsx_runtime134 = __toESM(require_jsx_runtime(), 1);
479854
479951
  var ExitWarning = /* @__PURE__ */ __name(() => {
479855
479952
  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." }) })
479953
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_jsx_runtime134.Fragment, { children: [
479954
+ 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." }) }),
479955
+ 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
479956
  ] });
479860
479957
  }, "ExitWarning");
479861
479958
 
479862
479959
  // packages/cli/src/ui/layouts/ScreenReaderAppLayout.tsx
479863
- var import_jsx_runtime134 = __toESM(require_jsx_runtime(), 1);
479960
+ var import_jsx_runtime135 = __toESM(require_jsx_runtime(), 1);
479864
479961
  var ScreenReaderAppLayout = /* @__PURE__ */ __name(() => {
479865
479962
  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)(
479963
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(Box_default, { flexDirection: "column", width: "90%", height: "100%", children: [
479964
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Notifications, {}),
479965
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Footer, {}),
479966
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Box_default, { flexGrow: 1, overflow: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(MainContent, {}) }),
479967
+ 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
479968
  DialogManager,
479872
479969
  {
479873
479970
  terminalWidth: uiState.terminalWidth,
479874
479971
  addItem: uiState.historyManager.addItem
479875
479972
  }
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, {})
479973
+ ) }) : 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, {}),
479974
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ExitWarning, {})
479878
479975
  ] });
479879
479976
  }, "ScreenReaderAppLayout");
479880
479977
 
479881
479978
  // packages/cli/src/ui/layouts/DefaultAppLayout.tsx
479882
479979
  init_esbuild_shims();
479883
- var import_react136 = __toESM(require_react(), 1);
479980
+ var import_react137 = __toESM(require_react(), 1);
479884
479981
 
479885
479982
  // packages/cli/src/ui/components/agent-view/AgentTabBar.tsx
479886
479983
  init_esbuild_shims();
479887
- var import_react127 = __toESM(require_react(), 1);
479984
+ var import_react128 = __toESM(require_react(), 1);
479888
479985
  init_dist4();
479889
- var import_jsx_runtime135 = __toESM(require_jsx_runtime(), 1);
479986
+ var import_jsx_runtime136 = __toESM(require_jsx_runtime(), 1);
479890
479987
  function statusIndicator(agent) {
479891
479988
  const status = agent.interactiveAgent.getStatus();
479892
479989
  switch (status) {
@@ -479931,9 +480028,9 @@ var AgentTabBar = /* @__PURE__ */ __name(() => {
479931
480028
  },
479932
480029
  { isActive: true }
479933
480030
  );
479934
- const [, setTick] = (0, import_react127.useState)(0);
479935
- const forceRender = (0, import_react127.useCallback)(() => setTick((t5) => t5 + 1), []);
479936
- (0, import_react127.useEffect)(() => {
480031
+ const [, setTick] = (0, import_react128.useState)(0);
480032
+ const forceRender = (0, import_react128.useCallback)(() => setTick((t5) => t5 + 1), []);
480033
+ (0, import_react128.useEffect)(() => {
479937
480034
  const cleanups = [];
479938
480035
  for (const [, agent] of agents) {
479939
480036
  const emitter = agent.interactiveAgent.getEventEmitter();
@@ -479948,8 +480045,8 @@ var AgentTabBar = /* @__PURE__ */ __name(() => {
479948
480045
  }, [agents, forceRender]);
479949
480046
  const isFocused = agentTabBarFocused;
479950
480047
  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)(
480048
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(Box_default, { flexDirection: "row", paddingX: 1, children: [
480049
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Box_default, { marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
479953
480050
  Text3,
479954
480051
  {
479955
480052
  bold: activeView === "main",
@@ -479959,12 +480056,12 @@ var AgentTabBar = /* @__PURE__ */ __name(() => {
479959
480056
  children: " Main "
479960
480057
  }
479961
480058
  ) }),
479962
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Text3, { dimColor: !isFocused, color: theme.border.default, children: "\u2502" }),
480059
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Text3, { dimColor: !isFocused, color: theme.border.default, children: "\u2502" }),
479963
480060
  [...agents.entries()].map(([agentId, agent]) => {
479964
480061
  const isActive = activeView === agentId;
479965
480062
  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)(
480063
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(Box_default, { marginLeft: 1, children: [
480064
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
479968
480065
  Text3,
479969
480066
  {
479970
480067
  bold: isActive,
@@ -479974,16 +480071,16 @@ var AgentTabBar = /* @__PURE__ */ __name(() => {
479974
480071
  children: ` ${agent.modelId} `
479975
480072
  }
479976
480073
  ),
479977
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Text3, { dimColor: !isFocused, color: indicatorColor, children: ` ${symbol2}` })
480074
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Text3, { dimColor: !isFocused, color: indicatorColor, children: ` ${symbol2}` })
479978
480075
  ] }, agentId);
479979
480076
  }),
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 }) })
480077
+ /* @__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
480078
  ] });
479982
480079
  }, "AgentTabBar");
479983
480080
 
479984
480081
  // packages/cli/src/ui/components/agent-view/AgentChatView.tsx
479985
480082
  init_esbuild_shims();
479986
- var import_react128 = __toESM(require_react(), 1);
480083
+ var import_react129 = __toESM(require_react(), 1);
479987
480084
  init_dist4();
479988
480085
 
479989
480086
  // packages/cli/src/ui/components/agent-view/agentHistoryAdapter.ts
@@ -480091,7 +480188,7 @@ __name(agentMessagesToHistoryItems, "agentMessagesToHistoryItems");
480091
480188
  // packages/cli/src/ui/components/agent-view/AgentHeader.tsx
480092
480189
  init_esbuild_shims();
480093
480190
  init_dist4();
480094
- var import_jsx_runtime136 = __toESM(require_jsx_runtime(), 1);
480191
+ var import_jsx_runtime137 = __toESM(require_jsx_runtime(), 1);
480095
480192
  var AgentHeader = /* @__PURE__ */ __name(({
480096
480193
  modelId,
480097
480194
  modelName,
@@ -480102,7 +480199,7 @@ var AgentHeader = /* @__PURE__ */ __name(({
480102
480199
  const maxPathLen = Math.max(20, terminalWidth - 12);
480103
480200
  const displayPath = shortenPath(tildeifyPath(workingDirectory), maxPathLen);
480104
480201
  const modelText = modelName && modelName !== modelId ? `${modelId} (${modelName})` : modelId;
480105
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
480202
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
480106
480203
  Box_default,
480107
480204
  {
480108
480205
  flexDirection: "column",
@@ -480112,17 +480209,17 @@ var AgentHeader = /* @__PURE__ */ __name(({
480112
480209
  borderColor: theme.border.default,
480113
480210
  paddingX: 1,
480114
480211
  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 })
480212
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(Text3, { children: [
480213
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Text3, { color: theme.text.secondary, children: "Model: " }),
480214
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Text3, { color: theme.text.primary, children: modelText })
480118
480215
  ] }),
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 })
480216
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(Text3, { children: [
480217
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Text3, { color: theme.text.secondary, children: "Path: " }),
480218
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Text3, { color: theme.text.primary, children: displayPath })
480122
480219
  ] }),
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 })
480220
+ gitBranch && /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(Text3, { children: [
480221
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Text3, { color: theme.text.secondary, children: "Branch: " }),
480222
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Text3, { color: theme.text.primary, children: gitBranch })
480126
480223
  ] })
480127
480224
  ]
480128
480225
  }
@@ -480130,7 +480227,7 @@ var AgentHeader = /* @__PURE__ */ __name(({
480130
480227
  }, "AgentHeader");
480131
480228
 
480132
480229
  // packages/cli/src/ui/components/agent-view/AgentChatView.tsx
480133
- var import_jsx_runtime137 = __toESM(require_jsx_runtime(), 1);
480230
+ var import_jsx_runtime138 = __toESM(require_jsx_runtime(), 1);
480134
480231
  var AgentChatView = /* @__PURE__ */ __name(({ agentId }) => {
480135
480232
  const { agents } = useAgentViewState();
480136
480233
  const { setAgentShellFocused } = useAgentViewActions();
@@ -480139,13 +480236,13 @@ var AgentChatView = /* @__PURE__ */ __name(({ agentId }) => {
480139
480236
  const { columns: terminalWidth } = useTerminalSize();
480140
480237
  const agent = agents.get(agentId);
480141
480238
  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)(() => {
480239
+ const [, setRenderTick] = (0, import_react129.useState)(0);
480240
+ const tickRef = (0, import_react129.useRef)(0);
480241
+ const forceRender = (0, import_react129.useCallback)(() => {
480145
480242
  tickRef.current += 1;
480146
480243
  setRenderTick(tickRef.current);
480147
480244
  }, []);
480148
- (0, import_react128.useEffect)(() => {
480245
+ (0, import_react129.useEffect)(() => {
480149
480246
  if (!agent) return;
480150
480247
  const emitter = agent.interactiveAgent.getEventEmitter();
480151
480248
  if (!emitter) return;
@@ -480178,12 +480275,12 @@ var AgentChatView = /* @__PURE__ */ __name(({ agentId }) => {
480178
480275
  const status = interactiveAgent?.getStatus();
480179
480276
  const isRunning = status === AgentStatus.RUNNING || status === AgentStatus.INITIALIZING;
480180
480277
  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)(() => {
480278
+ const [embeddedShellFocused, setEmbeddedShellFocusedLocal] = (0, import_react129.useState)(false);
480279
+ (0, import_react129.useEffect)(() => {
480183
480280
  setAgentShellFocused(embeddedShellFocused);
480184
480281
  return () => setAgentShellFocused(false);
480185
480282
  }, [embeddedShellFocused, setAgentShellFocused]);
480186
- (0, import_react128.useEffect)(() => {
480283
+ (0, import_react129.useEffect)(() => {
480187
480284
  if (!activePtyId) setEmbeddedShellFocusedLocal(false);
480188
480285
  }, [activePtyId]);
480189
480286
  useKeypress(
@@ -480196,7 +480293,7 @@ var AgentChatView = /* @__PURE__ */ __name(({ agentId }) => {
480196
480293
  },
480197
480294
  { isActive: true }
480198
480295
  );
480199
- const allItems = (0, import_react128.useMemo)(
480296
+ const allItems = (0, import_react129.useMemo)(
480200
480297
  () => agentMessagesToHistoryItems(
480201
480298
  messages,
480202
480299
  pendingApprovals ?? /* @__PURE__ */ new Map(),
@@ -480213,7 +480310,7 @@ var AgentChatView = /* @__PURE__ */ __name(({ agentId }) => {
480213
480310
  tickRef.current
480214
480311
  ]
480215
480312
  );
480216
- const splitIndex = (0, import_react128.useMemo)(() => {
480313
+ const splitIndex = (0, import_react129.useMemo)(() => {
480217
480314
  for (let idx = allItems.length - 1; idx >= 0; idx--) {
480218
480315
  const item = allItems[idx];
480219
480316
  if (item.type === "tool_group" && item.tools.some(
@@ -480228,14 +480325,14 @@ var AgentChatView = /* @__PURE__ */ __name(({ agentId }) => {
480228
480325
  const pendingItems = allItems.slice(splitIndex);
480229
480326
  const core = interactiveAgent?.getCore();
480230
480327
  const agentWorkingDir = core?.runtimeContext.getTargetDir() ?? "";
480231
- const agentGitBranch = (0, import_react128.useMemo)(
480328
+ const agentGitBranch = (0, import_react129.useMemo)(
480232
480329
  () => agentWorkingDir ? getGitBranch(agentWorkingDir) : "",
480233
480330
  // eslint-disable-next-line react-hooks/exhaustive-deps
480234
480331
  [agentId]
480235
480332
  );
480236
480333
  const agentModelId = core?.modelConfig.model ?? "";
480237
- const staticItems = (0, import_react128.useMemo)(() => [
480238
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
480334
+ const staticItems = (0, import_react129.useMemo)(() => [
480335
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
480239
480336
  AgentHeader,
480240
480337
  {
480241
480338
  modelId: agentModelId,
@@ -480245,7 +480342,7 @@ var AgentChatView = /* @__PURE__ */ __name(({ agentId }) => {
480245
480342
  },
480246
480343
  "agent-header"
480247
480344
  ),
480248
- ...committedItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
480345
+ ...committedItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
480249
480346
  HistoryItemDisplayComponent,
480250
480347
  {
480251
480348
  item,
@@ -480265,15 +480362,15 @@ var AgentChatView = /* @__PURE__ */ __name(({ agentId }) => {
480265
480362
  contentWidth
480266
480363
  ]);
480267
480364
  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: [
480365
+ 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
480366
  'Agent "',
480270
480367
  agentId,
480271
480368
  '" not found.'
480272
480369
  ] }) });
480273
480370
  }
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)(
480371
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(Box_default, { flexDirection: "column", children: [
480372
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Static, { items: staticItems, children: (item) => item }, `agent-${agentId}-${historyRemountKey}`),
480373
+ pendingItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
480277
480374
  HistoryItemDisplayComponent,
480278
480375
  {
480279
480376
  item,
@@ -480287,29 +480384,29 @@ var AgentChatView = /* @__PURE__ */ __name(({ agentId }) => {
480287
480384
  },
480288
480385
  item.id
480289
480386
  )),
480290
- isRunning && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Box_default, { marginX: 2, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(GeminiRespondingSpinner, {}) })
480387
+ isRunning && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Box_default, { marginX: 2, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(GeminiRespondingSpinner, {}) })
480291
480388
  ] });
480292
480389
  }, "AgentChatView");
480293
480390
 
480294
480391
  // packages/cli/src/ui/components/agent-view/AgentComposer.tsx
480295
480392
  init_esbuild_shims();
480296
- var import_react131 = __toESM(require_react(), 1);
480393
+ var import_react132 = __toESM(require_react(), 1);
480297
480394
  init_dist4();
480298
480395
 
480299
480396
  // packages/cli/src/ui/hooks/useAgentStreamingState.ts
480300
480397
  init_esbuild_shims();
480301
- var import_react130 = __toESM(require_react(), 1);
480398
+ var import_react131 = __toESM(require_react(), 1);
480302
480399
  init_dist4();
480303
480400
 
480304
480401
  // packages/cli/src/ui/hooks/useTimer.ts
480305
480402
  init_esbuild_shims();
480306
- var import_react129 = __toESM(require_react(), 1);
480403
+ var import_react130 = __toESM(require_react(), 1);
480307
480404
  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)(() => {
480405
+ const [elapsedTime, setElapsedTime] = (0, import_react130.useState)(0);
480406
+ const timerRef = (0, import_react130.useRef)(null);
480407
+ const prevResetKeyRef = (0, import_react130.useRef)(resetKey);
480408
+ const prevIsActiveRef = (0, import_react130.useRef)(isActive);
480409
+ (0, import_react130.useEffect)(() => {
480313
480410
  let shouldResetTime = false;
480314
480411
  if (prevResetKeyRef.current !== resetKey) {
480315
480412
  shouldResetTime = true;
@@ -480347,17 +480444,17 @@ var useTimer = /* @__PURE__ */ __name((isActive, resetKey) => {
480347
480444
 
480348
480445
  // packages/cli/src/ui/hooks/useAgentStreamingState.ts
480349
480446
  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)(() => {
480447
+ const [, setTick] = (0, import_react131.useState)(0);
480448
+ const tickRef = (0, import_react131.useRef)(0);
480449
+ const forceRender = (0, import_react131.useCallback)(() => {
480353
480450
  tickRef.current += 1;
480354
480451
  setTick(tickRef.current);
480355
480452
  }, []);
480356
- const [lastPromptTokenCount, setLastPromptTokenCount] = (0, import_react130.useState)(
480453
+ const [lastPromptTokenCount, setLastPromptTokenCount] = (0, import_react131.useState)(
480357
480454
  () => interactiveAgent?.getLastPromptTokenCount() ?? 0
480358
480455
  );
480359
480456
  const subscribedEvents = events ?? DEFAULT_EVENTS;
480360
- (0, import_react130.useEffect)(() => {
480457
+ (0, import_react131.useEffect)(() => {
480361
480458
  if (!interactiveAgent) return;
480362
480459
  const emitter = interactiveAgent.getEventEmitter();
480363
480460
  if (!emitter) return;
@@ -480382,7 +480479,7 @@ function useAgentStreamingState(interactiveAgent, events) {
480382
480479
  const status = interactiveAgent?.getStatus();
480383
480480
  const pendingApprovals = interactiveAgent?.getPendingApprovals();
480384
480481
  const hasPendingApprovals = pendingApprovals !== void 0 && pendingApprovals.size > 0;
480385
- const streamingState = (0, import_react130.useMemo)(() => {
480482
+ const streamingState = (0, import_react131.useMemo)(() => {
480386
480483
  if (hasPendingApprovals) {
480387
480484
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
480388
480485
  }
@@ -480392,9 +480489,9 @@ function useAgentStreamingState(interactiveAgent, events) {
480392
480489
  return "idle" /* Idle */;
480393
480490
  }, [status, hasPendingApprovals]);
480394
480491
  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)(() => {
480492
+ const [timerResetKey, setTimerResetKey] = (0, import_react131.useState)(0);
480493
+ const prevStreamingRef = (0, import_react131.useRef)(streamingState);
480494
+ (0, import_react131.useEffect)(() => {
480398
480495
  if (streamingState === "responding" /* Responding */ && prevStreamingRef.current !== "responding" /* Responding */) {
480399
480496
  setTimerResetKey((k2) => k2 + 1);
480400
480497
  }
@@ -480422,7 +480519,7 @@ var DEFAULT_EVENTS = [
480422
480519
  // packages/cli/src/ui/components/agent-view/AgentFooter.tsx
480423
480520
  init_esbuild_shims();
480424
480521
  init_dist4();
480425
- var import_jsx_runtime138 = __toESM(require_jsx_runtime(), 1);
480522
+ var import_jsx_runtime139 = __toESM(require_jsx_runtime(), 1);
480426
480523
  var AgentFooter = /* @__PURE__ */ __name(({
480427
480524
  approvalMode,
480428
480525
  promptTokenCount,
@@ -480434,7 +480531,7 @@ var AgentFooter = /* @__PURE__ */ __name(({
480434
480531
  if (!showApproval && !showContext) {
480435
480532
  return null;
480436
480533
  }
480437
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
480534
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
480438
480535
  Box_default,
480439
480536
  {
480440
480537
  justifyContent: "space-between",
@@ -480442,8 +480539,8 @@ var AgentFooter = /* @__PURE__ */ __name(({
480442
480539
  flexDirection: "row",
480443
480540
  alignItems: "center",
480444
480541
  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)(
480542
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Box_default, { marginLeft: 2, children: showApproval ? /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(AutoAcceptIndicator, { approvalMode }) : null }),
480543
+ /* @__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
480544
  ContextUsageDisplay,
480448
480545
  {
480449
480546
  promptTokenCount,
@@ -480457,7 +480554,7 @@ var AgentFooter = /* @__PURE__ */ __name(({
480457
480554
  }, "AgentFooter");
480458
480555
 
480459
480556
  // packages/cli/src/ui/components/agent-view/AgentComposer.tsx
480460
- var import_jsx_runtime139 = __toESM(require_jsx_runtime(), 1);
480557
+ var import_jsx_runtime140 = __toESM(require_jsx_runtime(), 1);
480461
480558
  var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
480462
480559
  const { agents, agentTabBarFocused, agentShellFocused, agentApprovalModes } = useAgentViewState();
480463
480560
  const {
@@ -480501,7 +480598,7 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
480501
480598
  },
480502
480599
  { isActive: !agentShellFocused }
480503
480600
  );
480504
- const isValidPath = (0, import_react131.useCallback)(() => false, []);
480601
+ const isValidPath = (0, import_react132.useCallback)(() => false, []);
480505
480602
  const buffer = useTextBuffer({
480506
480603
  initialText: "",
480507
480604
  viewport: { height: 3, width: inputWidth },
@@ -480509,16 +480606,16 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
480509
480606
  setRawMode,
480510
480607
  isValidPath
480511
480608
  });
480512
- (0, import_react131.useEffect)(() => {
480609
+ (0, import_react132.useEffect)(() => {
480513
480610
  setAgentInputBufferText(buffer.text);
480514
480611
  return () => setAgentInputBufferText("");
480515
480612
  }, [buffer.text, setAgentInputBufferText]);
480516
- (0, import_react131.useEffect)(() => {
480613
+ (0, import_react132.useEffect)(() => {
480517
480614
  if (!isInputActive) {
480518
480615
  setAgentTabBarFocused(true);
480519
480616
  }
480520
480617
  }, [isInputActive, streamingState, setAgentTabBarFocused]);
480521
- const handleKeypress = (0, import_react131.useCallback)(
480618
+ const handleKeypress = (0, import_react132.useCallback)(
480522
480619
  (key) => {
480523
480620
  if (agentTabBarFocused) {
480524
480621
  if (key.sequence && key.sequence.length === 1 && !key.ctrl && !key.meta) {
@@ -480536,15 +480633,15 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
480536
480633
  },
480537
480634
  [buffer, agentTabBarFocused, setAgentTabBarFocused]
480538
480635
  );
480539
- const [messageQueue, setMessageQueue] = (0, import_react131.useState)([]);
480540
- (0, import_react131.useEffect)(() => {
480636
+ const [messageQueue, setMessageQueue] = (0, import_react132.useState)([]);
480637
+ (0, import_react132.useEffect)(() => {
480541
480638
  if (streamingState === "idle" /* Idle */ && messageQueue.length > 0 && status !== void 0 && !isTerminalStatus(status)) {
480542
480639
  const combined = messageQueue.join("\n");
480543
480640
  setMessageQueue([]);
480544
480641
  interactiveAgent?.enqueueMessage(combined);
480545
480642
  }
480546
480643
  }, [streamingState, messageQueue, interactiveAgent, status]);
480547
- const handleSubmit = (0, import_react131.useCallback)(
480644
+ const handleSubmit = (0, import_react132.useCallback)(
480548
480645
  (text) => {
480549
480646
  const trimmed2 = text.trim();
480550
480647
  if (!trimmed2 || !interactiveAgent) return;
@@ -480556,7 +480653,7 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
480556
480653
  },
480557
480654
  [interactiveAgent, streamingState]
480558
480655
  );
480559
- const statusLabel = (0, import_react131.useMemo)(() => {
480656
+ const statusLabel = (0, import_react132.useMemo)(() => {
480560
480657
  switch (status) {
480561
480658
  case AgentStatus.COMPLETED:
480562
480659
  return { text: t4("Completed"), color: theme.status.success };
@@ -480577,21 +480674,21 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
480577
480674
  const isAutoAccept = agentApprovalMode !== ApprovalMode.DEFAULT;
480578
480675
  const statusColor = isYolo ? theme.status.errorDim : isAutoAccept ? theme.status.warningDim : void 0;
480579
480676
  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: [
480677
+ const prefixNode = /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(Text3, { color: statusColor ?? theme.text.accent, children: [
480581
480678
  isYolo ? "*" : ">",
480582
480679
  " "
480583
480680
  ] });
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)(
480681
+ 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: [
480682
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
480586
480683
  LoadingIndicator,
480587
480684
  {
480588
480685
  currentLoadingPhrase: streamingState === "responding" /* Responding */ ? t4("Thinking\u2026") : void 0,
480589
480686
  elapsedTime
480590
480687
  }
480591
480688
  ),
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)(
480689
+ 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 }) }),
480690
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(QueuedMessageDisplay, { messageQueue }),
480691
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
480595
480692
  BaseTextInput,
480596
480693
  {
480597
480694
  buffer,
@@ -480604,7 +480701,7 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
480604
480701
  isActive: isInputActive && !agentShellFocused
480605
480702
  }
480606
480703
  ),
480607
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
480704
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
480608
480705
  AgentFooter,
480609
480706
  {
480610
480707
  approvalMode: agentApprovalMode,
@@ -480618,20 +480715,20 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
480618
480715
 
480619
480716
  // packages/cli/src/ui/components/StatusBar.tsx
480620
480717
  init_esbuild_shims();
480621
- var import_react135 = __toESM(require_react(), 1);
480718
+ var import_react136 = __toESM(require_react(), 1);
480622
480719
  import path135 from "node:path";
480623
480720
  import os38 from "node:os";
480624
480721
 
480625
480722
  // packages/cli/src/ui/hooks/useGitBranchName.ts
480626
480723
  init_esbuild_shims();
480627
- var import_react132 = __toESM(require_react(), 1);
480724
+ var import_react133 = __toESM(require_react(), 1);
480628
480725
  init_dist4();
480629
480726
  import fs124 from "node:fs";
480630
480727
  import fsPromises6 from "node:fs/promises";
480631
480728
  import path134 from "node:path";
480632
480729
  function useGitBranchName(cwd6) {
480633
- const [branchName, setBranchName] = (0, import_react132.useState)(void 0);
480634
- const fetchBranchName = (0, import_react132.useCallback)(async () => {
480730
+ const [branchName, setBranchName] = (0, import_react133.useState)(void 0);
480731
+ const fetchBranchName = (0, import_react133.useCallback)(async () => {
480635
480732
  try {
480636
480733
  if (!isCommandAvailable("git").available) {
480637
480734
  return;
@@ -480656,7 +480753,7 @@ function useGitBranchName(cwd6) {
480656
480753
  setBranchName(void 0);
480657
480754
  }
480658
480755
  }, [cwd6, setBranchName]);
480659
- (0, import_react132.useEffect)(() => {
480756
+ (0, import_react133.useEffect)(() => {
480660
480757
  fetchBranchName();
480661
480758
  const gitLogsHeadPath = path134.join(cwd6, ".git", "logs", "HEAD");
480662
480759
  let watcher;
@@ -480682,11 +480779,11 @@ __name(useGitBranchName, "useGitBranchName");
480682
480779
 
480683
480780
  // packages/cli/src/ui/hooks/useGitDiffStat.ts
480684
480781
  init_esbuild_shims();
480685
- var import_react133 = __toESM(require_react(), 1);
480782
+ var import_react134 = __toESM(require_react(), 1);
480686
480783
  init_dist4();
480687
480784
  function useGitDiffStat(cwd6, intervalMs = 5e3) {
480688
- const [stat14, setStat] = (0, import_react133.useState)(null);
480689
- const fetchStat = (0, import_react133.useCallback)(async () => {
480785
+ const [stat14, setStat] = (0, import_react134.useState)(null);
480786
+ const fetchStat = (0, import_react134.useCallback)(async () => {
480690
480787
  try {
480691
480788
  if (!isCommandAvailable("git").available) {
480692
480789
  setStat(null);
@@ -480723,7 +480820,7 @@ function useGitDiffStat(cwd6, intervalMs = 5e3) {
480723
480820
  setStat(null);
480724
480821
  }
480725
480822
  }, [cwd6]);
480726
- (0, import_react133.useEffect)(() => {
480823
+ (0, import_react134.useEffect)(() => {
480727
480824
  fetchStat();
480728
480825
  const timer = setInterval(fetchStat, intervalMs);
480729
480826
  return () => clearInterval(timer);
@@ -480734,12 +480831,12 @@ __name(useGitDiffStat, "useGitDiffStat");
480734
480831
 
480735
480832
  // packages/cli/src/ui/hooks/useBackgroundAgentProgress.ts
480736
480833
  init_esbuild_shims();
480737
- var import_react134 = __toESM(require_react(), 1);
480834
+ var import_react135 = __toESM(require_react(), 1);
480738
480835
  init_dist4();
480739
480836
  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)(() => {
480837
+ const [activeAgents, setActiveAgents] = (0, import_react135.useState)(/* @__PURE__ */ new Map());
480838
+ const [lastFinished, setLastFinished] = (0, import_react135.useState)(null);
480839
+ (0, import_react135.useEffect)(() => {
480743
480840
  const onStarted = /* @__PURE__ */ __name((payload) => {
480744
480841
  setActiveAgents((prev) => {
480745
480842
  const next = new Map(prev);
@@ -480820,8 +480917,8 @@ function useBackgroundAgentProgress() {
480820
480917
  __name(useBackgroundAgentProgress, "useBackgroundAgentProgress");
480821
480918
 
480822
480919
  // 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)(
480920
+ var import_jsx_runtime141 = __toESM(require_jsx_runtime(), 1);
480921
+ 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
480922
  Text3,
480826
480923
  {
480827
480924
  color: color ?? (dim ? theme.text.secondary : theme.text.primary),
@@ -480829,7 +480926,7 @@ var Badge = /* @__PURE__ */ __name(({ children, dim, color }) => /* @__PURE__ */
480829
480926
  children
480830
480927
  }
480831
480928
  ) }), "Badge");
480832
- var Sep = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Text3, { color: theme.border.default, children: " \u2502 " }), "Sep");
480929
+ var Sep = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Text3, { color: theme.border.default, children: " \u2502 " }), "Sep");
480833
480930
  function tildify(p2) {
480834
480931
  const home = os38.homedir();
480835
480932
  if (p2 === home) return "~";
@@ -480847,7 +480944,7 @@ var StatusBar = /* @__PURE__ */ __name(({
480847
480944
  const { activeAgents } = useBackgroundAgentProgress();
480848
480945
  const cwdDisplay = tildify(path135.resolve(cwd6));
480849
480946
  const hasDiff = diff4 !== null && diff4.filesChanged > 0;
480850
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
480947
+ return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
480851
480948
  Box_default,
480852
480949
  {
480853
480950
  width: terminalWidth,
@@ -480861,51 +480958,51 @@ var StatusBar = /* @__PURE__ */ __name(({
480861
480958
  borderColor: theme.border.default,
480862
480959
  paddingX: 1,
480863
480960
  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() })
480961
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Text3, { color: theme.text.accent, bold: true, children: "\u27E1" }),
480962
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Sep, {}),
480963
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(Badge, { dim: true, children: [
480964
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Text3, { children: "\u2B21 " }),
480965
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Text3, { children: os38.hostname() })
480869
480966
  ] }),
480870
480967
  activeAgents.map((agent) => {
480871
480968
  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 }) })
480969
+ return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_react136.default.Fragment, { children: [
480970
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Sep, {}),
480971
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Badge, { children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Text3, { color: theme.text.secondary, children: label }) })
480875
480972
  ] }, agent.agentId);
480876
480973
  }),
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" }) })
480974
+ bgSessionActive && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
480975
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Sep, {}),
480976
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Badge, { children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Text3, { color: theme.text.secondary, children: "\u27F3 bg session" }) })
480880
480977
  ] }),
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: [
480978
+ hasDiff && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
480979
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Sep, {}),
480980
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(Badge, { children: [
480981
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(Text3, { color: theme.text.secondary, children: [
480885
480982
  diff4.filesChanged,
480886
480983
  " file",
480887
480984
  diff4.filesChanged !== 1 ? "s" : ""
480888
480985
  ] }),
480889
- diff4.linesAdded > 0 && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(Text3, { color: theme.status.success, children: [
480986
+ diff4.linesAdded > 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(Text3, { color: theme.status.success, children: [
480890
480987
  " +",
480891
480988
  diff4.linesAdded
480892
480989
  ] }),
480893
- diff4.linesRemoved > 0 && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(Text3, { color: theme.status.error, children: [
480990
+ diff4.linesRemoved > 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(Text3, { color: theme.status.error, children: [
480894
480991
  " \u2212",
480895
480992
  diff4.linesRemoved
480896
480993
  ] })
480897
480994
  ] })
480898
480995
  ] }),
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 })
480996
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Sep, {}),
480997
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(Badge, { dim: true, children: [
480998
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Text3, { children: "\u2302 " }),
480999
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Text3, { children: cwdDisplay })
480903
481000
  ] }),
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 })
481001
+ branch && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
481002
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Sep, {}),
481003
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(Badge, { children: [
481004
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Text3, { color: theme.text.secondary, children: "\u2387 " }),
481005
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Text3, { color: theme.text.primary, children: branch })
480909
481006
  ] })
480910
481007
  ] })
480911
481008
  ]
@@ -480914,7 +481011,7 @@ var StatusBar = /* @__PURE__ */ __name(({
480914
481011
  }, "StatusBar");
480915
481012
 
480916
481013
  // packages/cli/src/ui/layouts/DefaultAppLayout.tsx
480917
- var import_jsx_runtime141 = __toESM(require_jsx_runtime(), 1);
481014
+ var import_jsx_runtime142 = __toESM(require_jsx_runtime(), 1);
480918
481015
  var DefaultAppLayout = /* @__PURE__ */ __name(() => {
480919
481016
  const uiState = useUIState();
480920
481017
  const { refreshStatic } = useUIActions();
@@ -480923,30 +481020,30 @@ var DefaultAppLayout = /* @__PURE__ */ __name(() => {
480923
481020
  const config2 = useConfig();
480924
481021
  const hasAgents = agents.size > 0;
480925
481022
  const isAgentTab = activeView !== "main" && agents.has(activeView);
480926
- const prevViewRef = (0, import_react136.useRef)(activeView);
480927
- (0, import_react136.useEffect)(() => {
481023
+ const prevViewRef = (0, import_react137.useRef)(activeView);
481024
+ (0, import_react137.useEffect)(() => {
480928
481025
  if (prevViewRef.current !== activeView) {
480929
481026
  prevViewRef.current = activeView;
480930
481027
  refreshStatic();
480931
481028
  }
480932
481029
  }, [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, {})
481030
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(Box_default, { flexDirection: "column", width: terminalWidth, children: [
481031
+ isAgentTab ? /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [
481032
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(AgentChatView, { agentId: activeView }),
481033
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(Box_default, { flexDirection: "column", ref: uiState.mainControlsRef, children: [
481034
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(AgentComposer, { agentId: activeView }, activeView),
481035
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(ExitWarning, {})
480939
481036
  ] })
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)(
481037
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [
481038
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(MainContent, {}),
481039
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(Box_default, { flexDirection: "column", ref: uiState.mainControlsRef, children: [
481040
+ uiState.dialogsVisible ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
480944
481041
  Box_default,
480945
481042
  {
480946
481043
  marginX: 2,
480947
481044
  flexDirection: "column",
480948
481045
  width: uiState.mainAreaWidth,
480949
- children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
481046
+ children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
480950
481047
  DialogManager,
480951
481048
  {
480952
481049
  terminalWidth: uiState.terminalWidth,
@@ -480954,12 +481051,12 @@ var DefaultAppLayout = /* @__PURE__ */ __name(() => {
480954
481051
  }
480955
481052
  )
480956
481053
  }
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, {})
481054
+ ) : 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, {}),
481055
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(ExitWarning, {})
480959
481056
  ] })
480960
481057
  ] }),
480961
- hasAgents && !uiState.dialogsVisible && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(AgentTabBar, {}),
480962
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
481058
+ hasAgents && !uiState.dialogsVisible && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(AgentTabBar, {}),
481059
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
480963
481060
  StatusBar,
480964
481061
  {
480965
481062
  cwd: config2.getTargetDir(),
@@ -480971,14 +481068,14 @@ var DefaultAppLayout = /* @__PURE__ */ __name(() => {
480971
481068
  }, "DefaultAppLayout");
480972
481069
 
480973
481070
  // packages/cli/src/ui/App.tsx
480974
- var import_jsx_runtime142 = __toESM(require_jsx_runtime(), 1);
481071
+ var import_jsx_runtime143 = __toESM(require_jsx_runtime(), 1);
480975
481072
  var App2 = /* @__PURE__ */ __name(() => {
480976
481073
  const uiState = useUIState();
480977
481074
  const isScreenReaderEnabled = use_is_screen_reader_enabled_default();
480978
481075
  if (uiState.quittingMessages) {
480979
- return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(QuittingDisplay, {});
481076
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(QuittingDisplay, {});
480980
481077
  }
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, {}) });
481078
+ 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
481079
  }, "App");
480983
481080
 
480984
481081
  // packages/cli/src/ui/AppContainer.tsx
@@ -480987,12 +481084,12 @@ import process49 from "node:process";
480987
481084
 
480988
481085
  // packages/cli/src/ui/hooks/useMemoryMonitor.ts
480989
481086
  init_esbuild_shims();
480990
- var import_react137 = __toESM(require_react(), 1);
481087
+ var import_react138 = __toESM(require_react(), 1);
480991
481088
  import process36 from "node:process";
480992
481089
  var MEMORY_WARNING_THRESHOLD = 7 * 1024 * 1024 * 1024;
480993
481090
  var MEMORY_CHECK_INTERVAL = 60 * 1e3;
480994
481091
  var useMemoryMonitor = /* @__PURE__ */ __name(({ addItem }) => {
480995
- (0, import_react137.useEffect)(() => {
481092
+ (0, import_react138.useEffect)(() => {
480996
481093
  const intervalId = setInterval(() => {
480997
481094
  const usage2 = process36.memoryUsage().rss;
480998
481095
  if (usage2 > MEMORY_WARNING_THRESHOLD) {
@@ -481012,11 +481109,11 @@ var useMemoryMonitor = /* @__PURE__ */ __name(({ addItem }) => {
481012
481109
 
481013
481110
  // packages/cli/src/ui/hooks/useThemeCommand.ts
481014
481111
  init_esbuild_shims();
481015
- var import_react138 = __toESM(require_react(), 1);
481112
+ var import_react139 = __toESM(require_react(), 1);
481016
481113
  import process37 from "node:process";
481017
481114
  var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, addItem, initialThemeError) => {
481018
- const [isThemeDialogOpen, setIsThemeDialogOpen] = (0, import_react138.useState)(!!initialThemeError);
481019
- const openThemeDialog = (0, import_react138.useCallback)(() => {
481115
+ const [isThemeDialogOpen, setIsThemeDialogOpen] = (0, import_react139.useState)(!!initialThemeError);
481116
+ const openThemeDialog = (0, import_react139.useCallback)(() => {
481020
481117
  if (process37.env["NO_COLOR"]) {
481021
481118
  addItem(
481022
481119
  {
@@ -481031,7 +481128,7 @@ var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, add
481031
481128
  }
481032
481129
  setIsThemeDialogOpen(true);
481033
481130
  }, [addItem]);
481034
- const applyTheme = (0, import_react138.useCallback)(
481131
+ const applyTheme = (0, import_react139.useCallback)(
481035
481132
  (themeName) => {
481036
481133
  if (!themeManager.setActiveTheme(themeName)) {
481037
481134
  setIsThemeDialogOpen(true);
@@ -481046,13 +481143,13 @@ var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, add
481046
481143
  },
481047
481144
  [setThemeError]
481048
481145
  );
481049
- const handleThemeHighlight = (0, import_react138.useCallback)(
481146
+ const handleThemeHighlight = (0, import_react139.useCallback)(
481050
481147
  (themeName) => {
481051
481148
  applyTheme(themeName);
481052
481149
  },
481053
481150
  [applyTheme]
481054
481151
  );
481055
- const handleThemeSelect = (0, import_react138.useCallback)(
481152
+ const handleThemeSelect = (0, import_react139.useCallback)(
481056
481153
  (themeName, scope) => {
481057
481154
  try {
481058
481155
  const mergedCustomThemes = {
@@ -481093,7 +481190,7 @@ var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, add
481093
481190
 
481094
481191
  // packages/cli/src/ui/hooks/useFeedbackDialog.ts
481095
481192
  init_esbuild_shims();
481096
- var import_react139 = __toESM(require_react(), 1);
481193
+ var import_react140 = __toESM(require_react(), 1);
481097
481194
  init_dist4();
481098
481195
  import * as fs125 from "node:fs";
481099
481196
  var import_strip_json_comments3 = __toESM(require_strip_json_comments(), 1);
@@ -481139,20 +481236,20 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
481139
481236
  history,
481140
481237
  sessionStats
481141
481238
  }) => {
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)(() => {
481239
+ const [isFeedbackDialogOpen, setIsFeedbackDialogOpen] = (0, import_react140.useState)(false);
481240
+ const [isFeedbackDismissedTemporarily, setIsFeedbackDismissedTemporarily] = (0, import_react140.useState)(false);
481241
+ const openFeedbackDialog = (0, import_react140.useCallback)(() => {
481145
481242
  setIsFeedbackDialogOpen(true);
481146
481243
  }, []);
481147
- const closeFeedbackDialog = (0, import_react139.useCallback)(
481244
+ const closeFeedbackDialog = (0, import_react140.useCallback)(
481148
481245
  () => setIsFeedbackDialogOpen(false),
481149
481246
  []
481150
481247
  );
481151
- const temporaryCloseFeedbackDialog = (0, import_react139.useCallback)(() => {
481248
+ const temporaryCloseFeedbackDialog = (0, import_react140.useCallback)(() => {
481152
481249
  setIsFeedbackDialogOpen(false);
481153
481250
  setIsFeedbackDismissedTemporarily(true);
481154
481251
  }, []);
481155
- const submitFeedback = (0, import_react139.useCallback)(
481252
+ const submitFeedback = (0, import_react140.useCallback)(
481156
481253
  (rating) => {
481157
481254
  if (rating >= FEEDBACK_OPTIONS.GOOD && rating <= FEEDBACK_OPTIONS.FINE) {
481158
481255
  const feedbackEvent = new UserFeedbackEvent(
@@ -481172,7 +481269,7 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
481172
481269
  },
481173
481270
  [closeFeedbackDialog, sessionStats.sessionId, config2, settings2]
481174
481271
  );
481175
- (0, import_react139.useEffect)(() => {
481272
+ (0, import_react140.useEffect)(() => {
481176
481273
  const checkAndShowFeedback = /* @__PURE__ */ __name(() => {
481177
481274
  if (streamingState === "idle" /* Idle */ && history.length > 0) {
481178
481275
  if (!config2.getUsageStatisticsEnabled() || settings2.merged.ui?.enableUserFeedback === false || !lastMessageIsAIResponse(history) || Math.random() > FEEDBACK_SHOW_PROBABILITY || !meetsMinimumSessionRequirements(sessionStats) || isFeedbackDismissedTemporarily) {
@@ -481194,7 +481291,7 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
481194
481291
  settings2.merged.ui?.enableUserFeedback,
481195
481292
  config2
481196
481293
  ]);
481197
- (0, import_react139.useEffect)(() => {
481294
+ (0, import_react140.useEffect)(() => {
481198
481295
  if (streamingState === "responding" /* Responding */ && isFeedbackDismissedTemporarily) {
481199
481296
  setIsFeedbackDismissedTemporarily(false);
481200
481297
  }
@@ -481211,19 +481308,19 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
481211
481308
  // packages/cli/src/ui/auth/useAuth.ts
481212
481309
  init_esbuild_shims();
481213
481310
  init_dist4();
481214
- var import_react140 = __toESM(require_react(), 1);
481311
+ var import_react141 = __toESM(require_react(), 1);
481215
481312
  var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuthChange) => {
481216
481313
  const unAuthenticated = config2.getAuthType() === void 0;
481217
- const [authState, setAuthState] = (0, import_react140.useState)(
481314
+ const [authState, setAuthState] = (0, import_react141.useState)(
481218
481315
  unAuthenticated ? "updating" /* Updating */ : "unauthenticated" /* Unauthenticated */
481219
481316
  );
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)(
481317
+ const [authError, setAuthError] = (0, import_react141.useState)(null);
481318
+ const [isAuthenticating, setIsAuthenticating] = (0, import_react141.useState)(false);
481319
+ const [isAuthDialogOpen, setIsAuthDialogOpen] = (0, import_react141.useState)(unAuthenticated);
481320
+ const [pendingAuthType, setPendingAuthType] = (0, import_react141.useState)(
481224
481321
  void 0
481225
481322
  );
481226
- const onAuthError = (0, import_react140.useCallback)(
481323
+ const onAuthError = (0, import_react141.useCallback)(
481227
481324
  (error40) => {
481228
481325
  setAuthError(error40);
481229
481326
  if (error40) {
@@ -481233,7 +481330,7 @@ var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuth
481233
481330
  },
481234
481331
  [setAuthError, setAuthState]
481235
481332
  );
481236
- const handleAuthFailure = (0, import_react140.useCallback)(
481333
+ const handleAuthFailure = (0, import_react141.useCallback)(
481237
481334
  (error40) => {
481238
481335
  setIsAuthenticating(false);
481239
481336
  const errorMessage = t4("Failed to authenticate. Message: {{message}}", {
@@ -481252,7 +481349,7 @@ var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuth
481252
481349
  },
481253
481350
  [onAuthError, pendingAuthType, config2]
481254
481351
  );
481255
- const handleAuthSuccess = (0, import_react140.useCallback)(
481352
+ const handleAuthSuccess = (0, import_react141.useCallback)(
481256
481353
  async (authType, credentials) => {
481257
481354
  try {
481258
481355
  const authTypeScope = getPersistScopeForModelSelection(settings2);
@@ -481309,7 +481406,7 @@ var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuth
481309
481406
  },
481310
481407
  [settings2, handleAuthFailure, config2, addItem, onAuthChange]
481311
481408
  );
481312
- const performAuth = (0, import_react140.useCallback)(
481409
+ const performAuth = (0, import_react141.useCallback)(
481313
481410
  async (authType, credentials) => {
481314
481411
  try {
481315
481412
  await config2.refreshAuth(authType);
@@ -481320,7 +481417,7 @@ var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuth
481320
481417
  },
481321
481418
  [config2, handleAuthSuccess, handleAuthFailure]
481322
481419
  );
481323
- const isProviderManagedModel = (0, import_react140.useCallback)(
481420
+ const isProviderManagedModel = (0, import_react141.useCallback)(
481324
481421
  (authType, modelId) => {
481325
481422
  if (!modelId) {
481326
481423
  return false;
@@ -481339,7 +481436,7 @@ var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuth
481339
481436
  },
481340
481437
  [settings2]
481341
481438
  );
481342
- const handleAuthSelect = (0, import_react140.useCallback)(
481439
+ const handleAuthSelect = (0, import_react141.useCallback)(
481343
481440
  async (authType, credentials) => {
481344
481441
  if (!authType) {
481345
481442
  setIsAuthDialogOpen(false);
@@ -481384,10 +481481,10 @@ var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuth
481384
481481
  settings2.merged.model?.generationConfig
481385
481482
  ]
481386
481483
  );
481387
- const openAuthDialog = (0, import_react140.useCallback)(() => {
481484
+ const openAuthDialog = (0, import_react141.useCallback)(() => {
481388
481485
  setIsAuthDialogOpen(true);
481389
481486
  }, []);
481390
- const cancelAuthentication = (0, import_react140.useCallback)(() => {
481487
+ const cancelAuthentication = (0, import_react141.useCallback)(() => {
481391
481488
  if (isAuthenticating && pendingAuthType) {
481392
481489
  const authEvent = new AuthEvent(pendingAuthType, "manual", "cancelled");
481393
481490
  logAuth(config2, authEvent);
@@ -481396,7 +481493,7 @@ var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuth
481396
481493
  setIsAuthDialogOpen(true);
481397
481494
  setAuthError(null);
481398
481495
  }, [isAuthenticating, pendingAuthType, config2]);
481399
- const handleCodingPlanSubmit = (0, import_react140.useCallback)(
481496
+ const handleCodingPlanSubmit = (0, import_react141.useCallback)(
481400
481497
  async (apiKey, region = "china" /* CHINA */) => {
481401
481498
  try {
481402
481499
  setIsAuthenticating(true);
@@ -481475,7 +481572,7 @@ var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuth
481475
481572
  },
481476
481573
  [settings2, config2, handleAuthFailure, addItem, onAuthChange]
481477
481574
  );
481478
- const handleAlibabaStandardSubmit = (0, import_react140.useCallback)(
481575
+ const handleAlibabaStandardSubmit = (0, import_react141.useCallback)(
481479
481576
  async (apiKey, region, modelIdsInput) => {
481480
481577
  try {
481481
481578
  setIsAuthenticating(true);
@@ -481567,7 +481664,7 @@ var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuth
481567
481664
  },
481568
481665
  [settings2, config2, handleAuthFailure, addItem, onAuthChange]
481569
481666
  );
481570
- (0, import_react140.useEffect)(() => {
481667
+ (0, import_react141.useEffect)(() => {
481571
481668
  const defaultAuthType = process.env["QWEN_DEFAULT_AUTH_TYPE"];
481572
481669
  if (defaultAuthType && ![
481573
481670
  AuthType2.USE_OPENAI,
@@ -481609,14 +481706,14 @@ var useAuthCommand = /* @__PURE__ */ __name((settings2, config2, addItem, onAuth
481609
481706
 
481610
481707
  // packages/cli/src/ui/hooks/useEditorSettings.ts
481611
481708
  init_esbuild_shims();
481612
- var import_react141 = __toESM(require_react(), 1);
481709
+ var import_react142 = __toESM(require_react(), 1);
481613
481710
  init_dist4();
481614
481711
  var useEditorSettings = /* @__PURE__ */ __name((loadedSettings, setEditorError, addItem) => {
481615
- const [isEditorDialogOpen, setIsEditorDialogOpen] = (0, import_react141.useState)(false);
481616
- const openEditorDialog = (0, import_react141.useCallback)(() => {
481712
+ const [isEditorDialogOpen, setIsEditorDialogOpen] = (0, import_react142.useState)(false);
481713
+ const openEditorDialog = (0, import_react142.useCallback)(() => {
481617
481714
  setIsEditorDialogOpen(true);
481618
481715
  }, []);
481619
- const handleEditorSelect = (0, import_react141.useCallback)(
481716
+ const handleEditorSelect = (0, import_react142.useCallback)(
481620
481717
  (editorType, scope) => {
481621
481718
  if (editorType && (!checkHasEditorType(editorType) || !allowEditorTypeInSandbox(editorType))) {
481622
481719
  return;
@@ -481638,7 +481735,7 @@ var useEditorSettings = /* @__PURE__ */ __name((loadedSettings, setEditorError,
481638
481735
  },
481639
481736
  [loadedSettings, setEditorError, addItem]
481640
481737
  );
481641
- const exitEditorDialog = (0, import_react141.useCallback)(() => {
481738
+ const exitEditorDialog = (0, import_react142.useCallback)(() => {
481642
481739
  setIsEditorDialogOpen(false);
481643
481740
  }, []);
481644
481741
  return {
@@ -481651,13 +481748,13 @@ var useEditorSettings = /* @__PURE__ */ __name((loadedSettings, setEditorError,
481651
481748
 
481652
481749
  // packages/cli/src/ui/hooks/useSettingsCommand.ts
481653
481750
  init_esbuild_shims();
481654
- var import_react142 = __toESM(require_react(), 1);
481751
+ var import_react143 = __toESM(require_react(), 1);
481655
481752
  function useSettingsCommand() {
481656
- const [isSettingsDialogOpen, setIsSettingsDialogOpen] = (0, import_react142.useState)(false);
481657
- const openSettingsDialog = (0, import_react142.useCallback)(() => {
481753
+ const [isSettingsDialogOpen, setIsSettingsDialogOpen] = (0, import_react143.useState)(false);
481754
+ const openSettingsDialog = (0, import_react143.useCallback)(() => {
481658
481755
  setIsSettingsDialogOpen(true);
481659
481756
  }, []);
481660
- const closeSettingsDialog = (0, import_react142.useCallback)(() => {
481757
+ const closeSettingsDialog = (0, import_react143.useCallback)(() => {
481661
481758
  setIsSettingsDialogOpen(false);
481662
481759
  }, []);
481663
481760
  return {
@@ -481670,18 +481767,18 @@ __name(useSettingsCommand, "useSettingsCommand");
481670
481767
 
481671
481768
  // packages/cli/src/ui/hooks/useModelCommand.ts
481672
481769
  init_esbuild_shims();
481673
- var import_react143 = __toESM(require_react(), 1);
481770
+ var import_react144 = __toESM(require_react(), 1);
481674
481771
  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)(
481772
+ const [isModelDialogOpen, setIsModelDialogOpen] = (0, import_react144.useState)(false);
481773
+ const [isFastModelMode, setIsFastModelMode] = (0, import_react144.useState)(false);
481774
+ const openModelDialog = (0, import_react144.useCallback)(
481678
481775
  (options2) => {
481679
481776
  setIsFastModelMode(options2?.fastModelMode ?? false);
481680
481777
  setIsModelDialogOpen(true);
481681
481778
  },
481682
481779
  []
481683
481780
  );
481684
- const closeModelDialog = (0, import_react143.useCallback)(() => {
481781
+ const closeModelDialog = (0, import_react144.useCallback)(() => {
481685
481782
  setIsModelDialogOpen(false);
481686
481783
  setIsFastModelMode(false);
481687
481784
  }, []);
@@ -481695,13 +481792,13 @@ var useModelCommand = /* @__PURE__ */ __name(() => {
481695
481792
 
481696
481793
  // packages/cli/src/ui/hooks/useApprovalModeCommand.ts
481697
481794
  init_esbuild_shims();
481698
- var import_react144 = __toESM(require_react(), 1);
481795
+ var import_react145 = __toESM(require_react(), 1);
481699
481796
  var useApprovalModeCommand = /* @__PURE__ */ __name((loadedSettings, config2) => {
481700
- const [isApprovalModeDialogOpen, setIsApprovalModeDialogOpen] = (0, import_react144.useState)(false);
481701
- const openApprovalModeDialog = (0, import_react144.useCallback)(() => {
481797
+ const [isApprovalModeDialogOpen, setIsApprovalModeDialogOpen] = (0, import_react145.useState)(false);
481798
+ const openApprovalModeDialog = (0, import_react145.useCallback)(() => {
481702
481799
  setIsApprovalModeDialogOpen(true);
481703
481800
  }, []);
481704
- const handleApprovalModeSelect = (0, import_react144.useCallback)(
481801
+ const handleApprovalModeSelect = (0, import_react145.useCallback)(
481705
481802
  (mode, scope) => {
481706
481803
  try {
481707
481804
  if (!mode) {
@@ -481727,24 +481824,24 @@ var useApprovalModeCommand = /* @__PURE__ */ __name((loadedSettings, config2) =>
481727
481824
 
481728
481825
  // packages/cli/src/ui/hooks/useResumeCommand.ts
481729
481826
  init_esbuild_shims();
481730
- var import_react145 = __toESM(require_react(), 1);
481827
+ var import_react146 = __toESM(require_react(), 1);
481731
481828
  init_dist4();
481732
481829
  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)(
481830
+ const [isResumeDialogOpen, setIsResumeDialogOpen] = (0, import_react146.useState)(false);
481831
+ const [resumeMatchedSessions, setResumeMatchedSessions] = (0, import_react146.useState)();
481832
+ const openResumeDialog = (0, import_react146.useCallback)(
481736
481833
  (matchedSessions) => {
481737
481834
  setResumeMatchedSessions(matchedSessions);
481738
481835
  setIsResumeDialogOpen(true);
481739
481836
  },
481740
481837
  []
481741
481838
  );
481742
- const closeResumeDialog = (0, import_react145.useCallback)(() => {
481839
+ const closeResumeDialog = (0, import_react146.useCallback)(() => {
481743
481840
  setIsResumeDialogOpen(false);
481744
481841
  setResumeMatchedSessions(void 0);
481745
481842
  }, []);
481746
481843
  const { config: config2, historyManager, startNewSession, setSessionName, remount } = options2 ?? {};
481747
- const handleResume = (0, import_react145.useCallback)(
481844
+ const handleResume = (0, import_react146.useCallback)(
481748
481845
  async (sessionId) => {
481749
481846
  if (!config2 || !historyManager || !startNewSession) {
481750
481847
  return false;
@@ -481797,17 +481894,17 @@ __name(useResumeCommand, "useResumeCommand");
481797
481894
 
481798
481895
  // packages/cli/src/ui/hooks/useDeleteCommand.ts
481799
481896
  init_esbuild_shims();
481800
- var import_react146 = __toESM(require_react(), 1);
481897
+ var import_react147 = __toESM(require_react(), 1);
481801
481898
  function useDeleteCommand(options2) {
481802
- const [isDeleteDialogOpen, setIsDeleteDialogOpen] = (0, import_react146.useState)(false);
481803
- const openDeleteDialog = (0, import_react146.useCallback)(() => {
481899
+ const [isDeleteDialogOpen, setIsDeleteDialogOpen] = (0, import_react147.useState)(false);
481900
+ const openDeleteDialog = (0, import_react147.useCallback)(() => {
481804
481901
  setIsDeleteDialogOpen(true);
481805
481902
  }, []);
481806
- const closeDeleteDialog = (0, import_react146.useCallback)(() => {
481903
+ const closeDeleteDialog = (0, import_react147.useCallback)(() => {
481807
481904
  setIsDeleteDialogOpen(false);
481808
481905
  }, []);
481809
481906
  const { config: config2, addItem } = options2 ?? {};
481810
- const handleDelete = (0, import_react146.useCallback)(
481907
+ const handleDelete = (0, import_react147.useCallback)(
481811
481908
  async (sessionId) => {
481812
481909
  if (!config2) {
481813
481910
  return;
@@ -481866,7 +481963,7 @@ __name(useDeleteCommand, "useDeleteCommand");
481866
481963
 
481867
481964
  // packages/cli/src/ui/hooks/slashCommandProcessor.ts
481868
481965
  init_esbuild_shims();
481869
- var import_react147 = __toESM(require_react(), 1);
481966
+ var import_react148 = __toESM(require_react(), 1);
481870
481967
 
481871
481968
  // packages/cli/node_modules/@google/genai/dist/node/index.mjs
481872
481969
  init_esbuild_shims();
@@ -482582,34 +482679,34 @@ var SLASH_COMMANDS_SKIP_RECORDING = /* @__PURE__ */ new Set([
482582
482679
  ]);
482583
482680
  var useSlashCommandProcessor = /* @__PURE__ */ __name((config2, settings2, addItem, clearItems, loadHistory, history, refreshStatic, toggleVimEnabled, isProcessing, setIsProcessing, setGeminiMdFileCount, actions, extensionsUpdateState, isConfigInitialized, logger10, setSessionName) => {
482584
482681
  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)(() => {
482682
+ const [commands, setCommands] = (0, import_react148.useState)([]);
482683
+ const [reloadTrigger, setReloadTrigger] = (0, import_react148.useState)(0);
482684
+ const reloadCommands = (0, import_react148.useCallback)(() => {
482588
482685
  setReloadTrigger((v2) => v2 + 1);
482589
482686
  }, []);
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)(
482687
+ const [shellConfirmationRequest, setShellConfirmationRequest] = (0, import_react148.useState)(null);
482688
+ const [confirmationRequest, setConfirmationRequest] = (0, import_react148.useState)(null);
482689
+ const [sessionShellAllowlist, setSessionShellAllowlist] = (0, import_react148.useState)(
482593
482690
  /* @__PURE__ */ new Set()
482594
482691
  );
482595
- const gitService = (0, import_react147.useMemo)(() => {
482692
+ const gitService = (0, import_react148.useMemo)(() => {
482596
482693
  if (!config2?.getProjectRoot()) {
482597
482694
  return;
482598
482695
  }
482599
482696
  return new GitService(config2.getProjectRoot(), config2.storage);
482600
482697
  }, [config2]);
482601
- const [pendingItem, setPendingItem] = (0, import_react147.useState)(
482698
+ const [pendingItem, setPendingItem] = (0, import_react148.useState)(
482602
482699
  null
482603
482700
  );
482604
- const [btwItem, setBtwItem] = (0, import_react147.useState)(null);
482605
- const btwAbortControllerRef = (0, import_react147.useRef)(null);
482606
- const cancelBtw = (0, import_react147.useCallback)(() => {
482701
+ const [btwItem, setBtwItem] = (0, import_react148.useState)(null);
482702
+ const btwAbortControllerRef = (0, import_react148.useRef)(null);
482703
+ const cancelBtw = (0, import_react148.useCallback)(() => {
482607
482704
  btwAbortControllerRef.current?.abort();
482608
482705
  btwAbortControllerRef.current = null;
482609
482706
  setBtwItem(null);
482610
482707
  }, []);
482611
- const abortControllerRef = (0, import_react147.useRef)(null);
482612
- const cancelSlashCommand = (0, import_react147.useCallback)(() => {
482708
+ const abortControllerRef = (0, import_react148.useRef)(null);
482709
+ const cancelSlashCommand = (0, import_react148.useCallback)(() => {
482613
482710
  cancelBtw();
482614
482711
  if (!abortControllerRef.current) {
482615
482712
  return;
@@ -482633,14 +482730,14 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config2, settings2, addIt
482633
482730
  },
482634
482731
  { isActive: isProcessing }
482635
482732
  );
482636
- const pendingHistoryItems = (0, import_react147.useMemo)(() => {
482733
+ const pendingHistoryItems = (0, import_react148.useMemo)(() => {
482637
482734
  const items = [];
482638
482735
  if (pendingItem != null) {
482639
482736
  items.push(pendingItem);
482640
482737
  }
482641
482738
  return items;
482642
482739
  }, [pendingItem]);
482643
- const addMessage = (0, import_react147.useCallback)(
482740
+ const addMessage = (0, import_react148.useCallback)(
482644
482741
  (message) => {
482645
482742
  let historyItemContent;
482646
482743
  if (message.type === "about" /* ABOUT */) {
@@ -482696,7 +482793,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config2, settings2, addIt
482696
482793
  },
482697
482794
  [addItem]
482698
482795
  );
482699
- const commandContext = (0, import_react147.useMemo)(
482796
+ const commandContext = (0, import_react148.useMemo)(
482700
482797
  () => ({
482701
482798
  services: {
482702
482799
  config: config2,
@@ -482762,7 +482859,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config2, settings2, addIt
482762
482859
  extensionsUpdateState
482763
482860
  ]
482764
482861
  );
482765
- (0, import_react147.useEffect)(() => {
482862
+ (0, import_react148.useEffect)(() => {
482766
482863
  if (!config2) {
482767
482864
  return;
482768
482865
  }
@@ -482780,7 +482877,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config2, settings2, addIt
482780
482877
  })();
482781
482878
  };
482782
482879
  }, [config2, reloadCommands]);
482783
- (0, import_react147.useEffect)(() => {
482880
+ (0, import_react148.useEffect)(() => {
482784
482881
  const controller = new AbortController();
482785
482882
  const load = /* @__PURE__ */ __name(async () => {
482786
482883
  try {
@@ -482808,7 +482905,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config2, settings2, addIt
482808
482905
  controller.abort();
482809
482906
  };
482810
482907
  }, [config2, reloadTrigger, isConfigInitialized]);
482811
- const handleSlashCommand2 = (0, import_react147.useCallback)(
482908
+ const handleSlashCommand2 = (0, import_react148.useCallback)(
482812
482909
  async (rawQuery, oneTimeShellAllowlist, overwriteConfirmed) => {
482813
482910
  if (typeof rawQuery !== "string") {
482814
482911
  return false;
@@ -483172,11 +483269,11 @@ import * as fs136 from "node:fs";
483172
483269
 
483173
483270
  // packages/cli/src/ui/hooks/useLogger.ts
483174
483271
  init_esbuild_shims();
483175
- var import_react148 = __toESM(require_react(), 1);
483272
+ var import_react149 = __toESM(require_react(), 1);
483176
483273
  init_dist4();
483177
483274
  var useLogger = /* @__PURE__ */ __name((storage, sessionId) => {
483178
- const [logger10, setLogger] = (0, import_react148.useState)(null);
483179
- (0, import_react148.useEffect)(() => {
483275
+ const [logger10, setLogger] = (0, import_react149.useState)(null);
483276
+ (0, import_react149.useEffect)(() => {
483180
483277
  if (!sessionId) {
483181
483278
  return;
483182
483279
  }
@@ -483191,12 +483288,12 @@ var useLogger = /* @__PURE__ */ __name((storage, sessionId) => {
483191
483288
 
483192
483289
  // packages/cli/src/ui/hooks/useGeminiStream.ts
483193
483290
  init_esbuild_shims();
483194
- var import_react152 = __toESM(require_react(), 1);
483291
+ var import_react153 = __toESM(require_react(), 1);
483195
483292
  init_dist4();
483196
483293
 
483197
483294
  // packages/cli/src/ui/hooks/shellCommandProcessor.ts
483198
483295
  init_esbuild_shims();
483199
- var import_react149 = __toESM(require_react(), 1);
483296
+ var import_react150 = __toESM(require_react(), 1);
483200
483297
  init_dist4();
483201
483298
  import crypto14 from "node:crypto";
483202
483299
  import path136 from "node:path";
@@ -483226,8 +483323,8 @@ ${modelContent}
483226
483323
  }
483227
483324
  __name(addShellCommandToGeminiHistory, "addShellCommandToGeminiHistory");
483228
483325
  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)(
483326
+ const [activeShellPtyId, setActiveShellPtyId] = (0, import_react150.useState)(null);
483327
+ const handleShellCommand = (0, import_react150.useCallback)(
483231
483328
  (rawQuery, abortSignal) => {
483232
483329
  if (typeof rawQuery !== "string" || rawQuery.trim() === "") {
483233
483330
  return false;
@@ -483534,11 +483631,11 @@ var findLastSafeSplitPoint = /* @__PURE__ */ __name((content) => {
483534
483631
 
483535
483632
  // packages/cli/src/ui/hooks/useStateAndRef.ts
483536
483633
  init_esbuild_shims();
483537
- var import_react150 = __toESM(require_react(), 1);
483634
+ var import_react151 = __toESM(require_react(), 1);
483538
483635
  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(
483636
+ const [state, setState] = import_react151.default.useState(initialValue);
483637
+ const ref = import_react151.default.useRef(initialValue);
483638
+ const setStateInternal = import_react151.default.useCallback(
483542
483639
  (newStateOrCallback) => {
483543
483640
  let newValue;
483544
483641
  if (typeof newStateOrCallback === "function") {
@@ -483557,11 +483654,11 @@ var useStateAndRef = /* @__PURE__ */ __name((initialValue) => {
483557
483654
  // packages/cli/src/ui/hooks/useReactToolScheduler.ts
483558
483655
  init_esbuild_shims();
483559
483656
  init_dist4();
483560
- var import_react151 = __toESM(require_react(), 1);
483657
+ var import_react152 = __toESM(require_react(), 1);
483561
483658
  var debugLogger156 = createDebugLogger("REACT_TOOL_SCHEDULER");
483562
483659
  function useReactToolScheduler(onComplete, config2, getPreferredEditor, onEditorClose) {
483563
- const [toolCallsForDisplay, setToolCallsForDisplay] = (0, import_react151.useState)([]);
483564
- const outputUpdateHandler = (0, import_react151.useCallback)(
483660
+ const [toolCallsForDisplay, setToolCallsForDisplay] = (0, import_react152.useState)([]);
483661
+ const outputUpdateHandler = (0, import_react152.useCallback)(
483565
483662
  (toolCallId, outputChunk) => {
483566
483663
  setToolCallsForDisplay(
483567
483664
  (prevCalls) => prevCalls.map((tc) => {
@@ -483575,13 +483672,13 @@ function useReactToolScheduler(onComplete, config2, getPreferredEditor, onEditor
483575
483672
  },
483576
483673
  []
483577
483674
  );
483578
- const allToolCallsCompleteHandler = (0, import_react151.useCallback)(
483675
+ const allToolCallsCompleteHandler = (0, import_react152.useCallback)(
483579
483676
  async (completedToolCalls) => {
483580
483677
  await onComplete(completedToolCalls);
483581
483678
  },
483582
483679
  [onComplete]
483583
483680
  );
483584
- const toolCallsUpdateHandler = (0, import_react151.useCallback)(
483681
+ const toolCallsUpdateHandler = (0, import_react152.useCallback)(
483585
483682
  (updatedCoreToolCalls) => {
483586
483683
  setToolCallsForDisplay(
483587
483684
  (prevTrackedCalls) => updatedCoreToolCalls.map((coreTc) => {
@@ -483608,7 +483705,7 @@ function useReactToolScheduler(onComplete, config2, getPreferredEditor, onEditor
483608
483705
  },
483609
483706
  [setToolCallsForDisplay]
483610
483707
  );
483611
- const scheduler = (0, import_react151.useMemo)(
483708
+ const scheduler = (0, import_react152.useMemo)(
483612
483709
  () => new CoreToolScheduler({
483613
483710
  config: config2,
483614
483711
  chatRecordingService: config2.getChatRecordingService(),
@@ -483627,13 +483724,13 @@ function useReactToolScheduler(onComplete, config2, getPreferredEditor, onEditor
483627
483724
  onEditorClose
483628
483725
  ]
483629
483726
  );
483630
- const schedule = (0, import_react151.useCallback)(
483727
+ const schedule = (0, import_react152.useCallback)(
483631
483728
  (request3, signal) => {
483632
483729
  void scheduler.schedule(request3, signal);
483633
483730
  },
483634
483731
  [scheduler]
483635
483732
  );
483636
- const markToolsAsSubmitted = (0, import_react151.useCallback)(
483733
+ const markToolsAsSubmitted = (0, import_react152.useCallback)(
483637
483734
  (callIdsToMark) => {
483638
483735
  setToolCallsForDisplay(
483639
483736
  (prevCalls) => prevCalls.map(
@@ -483643,8 +483740,8 @@ function useReactToolScheduler(onComplete, config2, getPreferredEditor, onEditor
483643
483740
  },
483644
483741
  []
483645
483742
  );
483646
- const lastForceCancelledCountRef = (0, import_react151.useRef)(0);
483647
- const forceCancelStaleToolCalls = (0, import_react151.useCallback)(() => {
483743
+ const lastForceCancelledCountRef = (0, import_react152.useRef)(0);
483744
+ const forceCancelStaleToolCalls = (0, import_react152.useCallback)(() => {
483648
483745
  lastForceCancelledCountRef.current = 0;
483649
483746
  setToolCallsForDisplay((prevCalls) => {
483650
483747
  let changed = 0;
@@ -483907,19 +484004,19 @@ function showCitations(settings2) {
483907
484004
  }
483908
484005
  __name(showCitations, "showCitations");
483909
484006
  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);
484007
+ const [initError, setInitError] = (0, import_react153.useState)(null);
484008
+ const abortControllerRef = (0, import_react153.useRef)(null);
484009
+ const flushBufferedStreamEventsRef = (0, import_react153.useRef)(/* @__PURE__ */ new Set());
484010
+ const turnCancelledRef = (0, import_react153.useRef)(false);
484011
+ const queryGuardRef = (0, import_react153.useRef)(new QueryGuard());
484012
+ const lastPromptRef = (0, import_react153.useRef)(null);
484013
+ const lastPromptErroredRef = (0, import_react153.useRef)(false);
484014
+ const [isResponding, setIsResponding] = (0, import_react153.useState)(false);
484015
+ const isBackgroundedRef = (0, import_react153.useRef)(false);
484016
+ const bgResponseTextRef = (0, import_react153.useRef)("");
484017
+ const [isBackgrounded, setIsBackgrounded] = (0, import_react153.useState)(false);
484018
+ const pendingCompletedToolsRef = (0, import_react153.useRef)([]);
484019
+ const [thought, setThought] = (0, import_react153.useState)(null);
483923
484020
  const [pendingHistoryItem, pendingHistoryItemRef, setPendingHistoryItem] = useStateAndRef(null);
483924
484021
  const [
483925
484022
  pendingRetryErrorItem,
@@ -483931,10 +484028,10 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
483931
484028
  pendingRetryCountdownItemRef,
483932
484029
  setPendingRetryCountdownItem
483933
484030
  ] = useStateAndRef(null);
483934
- const retryCountdownTimerRef = (0, import_react152.useRef)(
484031
+ const retryCountdownTimerRef = (0, import_react153.useRef)(
483935
484032
  null
483936
484033
  );
483937
- const processedMemoryToolsRef = (0, import_react152.useRef)(/* @__PURE__ */ new Set());
484034
+ const processedMemoryToolsRef = (0, import_react153.useRef)(/* @__PURE__ */ new Set());
483938
484035
  const {
483939
484036
  startNewPrompt,
483940
484037
  getPromptCount,
@@ -483942,16 +484039,16 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
483942
484039
  } = useSessionStats();
483943
484040
  const storage = config2.storage;
483944
484041
  const logger10 = useLogger(storage, sessionStates.sessionId);
483945
- const gitService = (0, import_react152.useMemo)(() => {
484042
+ const gitService = (0, import_react153.useMemo)(() => {
483946
484043
  if (!config2.getProjectRoot()) {
483947
484044
  return;
483948
484045
  }
483949
484046
  return new GitService(config2.getProjectRoot(), storage);
483950
484047
  }, [config2, storage]);
483951
- const addItemRef = (0, import_react152.useRef)(addItem);
484048
+ const addItemRef = (0, import_react153.useRef)(addItem);
483952
484049
  addItemRef.current = addItem;
483953
- const onCompleteFnRef = (0, import_react152.useRef)(void 0);
483954
- const stableOnComplete = (0, import_react152.useCallback)(
484050
+ const onCompleteFnRef = (0, import_react153.useRef)(void 0);
484051
+ const stableOnComplete = (0, import_react153.useCallback)(
483955
484052
  async (completedToolCallsFromScheduler) => {
483956
484053
  if (completedToolCallsFromScheduler.length > 0) {
483957
484054
  addItemRef.current(
@@ -483974,17 +484071,17 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
483974
484071
  getPreferredEditor,
483975
484072
  onEditorClose
483976
484073
  );
483977
- const toolCallsRef = (0, import_react152.useRef)(toolCalls);
484074
+ const toolCallsRef = (0, import_react153.useRef)(toolCalls);
483978
484075
  toolCallsRef.current = toolCalls;
483979
- const markToolsAsSubmittedRef = (0, import_react152.useRef)(markToolsAsSubmitted);
484076
+ const markToolsAsSubmittedRef = (0, import_react153.useRef)(markToolsAsSubmitted);
483980
484077
  markToolsAsSubmittedRef.current = markToolsAsSubmitted;
483981
- const forceCancelStaleToolCallsRef = (0, import_react152.useRef)(forceCancelStaleToolCalls);
484078
+ const forceCancelStaleToolCallsRef = (0, import_react153.useRef)(forceCancelStaleToolCalls);
483982
484079
  forceCancelStaleToolCallsRef.current = forceCancelStaleToolCalls;
483983
- const pendingToolCallGroupDisplay = (0, import_react152.useMemo)(
484080
+ const pendingToolCallGroupDisplay = (0, import_react153.useMemo)(
483984
484081
  () => toolCalls.length ? mapToDisplay(toolCalls) : void 0,
483985
484082
  [toolCalls]
483986
484083
  );
483987
- const activeToolPtyId = (0, import_react152.useMemo)(() => {
484084
+ const activeToolPtyId = (0, import_react153.useMemo)(() => {
483988
484085
  const executingShellTool = toolCalls?.find(
483989
484086
  (tc) => tc.status === "executing" && tc.request.name === "run_shell_command"
483990
484087
  );
@@ -483993,18 +484090,18 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
483993
484090
  }
483994
484091
  return void 0;
483995
484092
  }, [toolCalls]);
483996
- const loopDetectedRef = (0, import_react152.useRef)(false);
484093
+ const loopDetectedRef = (0, import_react153.useRef)(false);
483997
484094
  const [
483998
484095
  loopDetectionConfirmationRequest,
483999
484096
  setLoopDetectionConfirmationRequest
484000
- ] = (0, import_react152.useState)(null);
484001
- const stopRetryCountdownTimer = (0, import_react152.useCallback)(() => {
484097
+ ] = (0, import_react153.useState)(null);
484098
+ const stopRetryCountdownTimer = (0, import_react153.useCallback)(() => {
484002
484099
  if (retryCountdownTimerRef.current) {
484003
484100
  clearInterval(retryCountdownTimerRef.current);
484004
484101
  retryCountdownTimerRef.current = null;
484005
484102
  }
484006
484103
  }, []);
484007
- const clearRetryCountdown = (0, import_react152.useCallback)(() => {
484104
+ const clearRetryCountdown = (0, import_react153.useCallback)(() => {
484008
484105
  stopRetryCountdownTimer();
484009
484106
  setPendingRetryErrorItem(null);
484010
484107
  setPendingRetryCountdownItem(null);
@@ -484013,7 +484110,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484013
484110
  setPendingRetryCountdownItem,
484014
484111
  stopRetryCountdownTimer
484015
484112
  ]);
484016
- const startRetryCountdown = (0, import_react152.useCallback)(
484113
+ const startRetryCountdown = (0, import_react153.useCallback)(
484017
484114
  (retryInfo) => {
484018
484115
  stopRetryCountdownTimer();
484019
484116
  const startTime = Date.now();
@@ -484053,8 +484150,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484053
484150
  stopRetryCountdownTimer
484054
484151
  ]
484055
484152
  );
484056
- (0, import_react152.useEffect)(() => () => stopRetryCountdownTimer(), [stopRetryCountdownTimer]);
484057
- const onExec = (0, import_react152.useCallback)(async (done) => {
484153
+ (0, import_react153.useEffect)(() => () => stopRetryCountdownTimer(), [stopRetryCountdownTimer]);
484154
+ const onExec = (0, import_react153.useCallback)(async (done) => {
484058
484155
  setIsResponding(true);
484059
484156
  await done;
484060
484157
  setIsResponding(false);
@@ -484071,12 +484168,12 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484071
484168
  terminalHeight
484072
484169
  );
484073
484170
  const activePtyId = activeShellPtyId || activeToolPtyId;
484074
- (0, import_react152.useEffect)(() => {
484171
+ (0, import_react153.useEffect)(() => {
484075
484172
  if (!activePtyId) {
484076
484173
  setShellInputFocused(false);
484077
484174
  }
484078
484175
  }, [activePtyId, setShellInputFocused]);
484079
- const streamingState = (0, import_react152.useMemo)(() => {
484176
+ const streamingState = (0, import_react153.useMemo)(() => {
484080
484177
  if (toolCalls.some((tc) => tc.status === "awaiting_approval")) {
484081
484178
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
484082
484179
  }
@@ -484097,7 +484194,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484097
484194
  }
484098
484195
  return "idle" /* Idle */;
484099
484196
  }, [isResponding, toolCalls, isBackgrounded]);
484100
- (0, import_react152.useEffect)(() => {
484197
+ (0, import_react153.useEffect)(() => {
484101
484198
  if (config2.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
484102
484199
  const lastUserMessageIndex = history.findLastIndex(
484103
484200
  (item) => item.type === "user" /* USER */
@@ -484111,7 +484208,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484111
484208
  }
484112
484209
  }
484113
484210
  }, [streamingState, config2, history]);
484114
- const cancelOngoingRequest = (0, import_react152.useCallback)(() => {
484211
+ const cancelOngoingRequest = (0, import_react153.useCallback)(() => {
484115
484212
  if (streamingState !== "responding" /* Responding */ && streamingState !== "backgrounded" /* Backgrounded */) {
484116
484213
  return;
484117
484214
  }
@@ -484178,7 +484275,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484178
484275
  config2,
484179
484276
  getPromptCount
484180
484277
  ]);
484181
- const backgroundCurrentSession = (0, import_react152.useCallback)(() => {
484278
+ const backgroundCurrentSession = (0, import_react153.useCallback)(() => {
484182
484279
  if (streamingState !== "responding" /* Responding */) return;
484183
484280
  if (pendingHistoryItemRef.current) {
484184
484281
  addItem(pendingHistoryItemRef.current, Date.now());
@@ -484196,7 +484293,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484196
484293
  Date.now()
484197
484294
  );
484198
484295
  }, [streamingState, pendingHistoryItemRef, addItem, setPendingHistoryItem]);
484199
- const prepareQueryForGemini = (0, import_react152.useCallback)(
484296
+ const prepareQueryForGemini = (0, import_react153.useCallback)(
484200
484297
  async (query, userMessageTimestamp, abortSignal, prompt_id) => {
484201
484298
  if (turnCancelledRef.current) {
484202
484299
  return { queryToSend: null, shouldProceed: false };
@@ -484286,7 +484383,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484286
484383
  scheduleToolCalls
484287
484384
  ]
484288
484385
  );
484289
- const handleContentEvent = (0, import_react152.useCallback)(
484386
+ const handleContentEvent = (0, import_react153.useCallback)(
484290
484387
  (eventValue, currentGeminiMessageBuffer, userMessageTimestamp) => {
484291
484388
  if (turnCancelledRef.current) {
484292
484389
  return "";
@@ -484326,7 +484423,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484326
484423
  },
484327
484424
  [addItem, pendingHistoryItemRef, setPendingHistoryItem]
484328
484425
  );
484329
- const mergeThought = (0, import_react152.useCallback)(
484426
+ const mergeThought = (0, import_react153.useCallback)(
484330
484427
  (incoming) => {
484331
484428
  setThought((prev) => {
484332
484429
  if (!prev) {
@@ -484339,7 +484436,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484339
484436
  },
484340
484437
  [setThought]
484341
484438
  );
484342
- const handleThoughtEvent = (0, import_react152.useCallback)(
484439
+ const handleThoughtEvent = (0, import_react153.useCallback)(
484343
484440
  (eventValue, currentThoughtBuffer, userMessageTimestamp) => {
484344
484441
  if (turnCancelledRef.current) {
484345
484442
  return "";
@@ -484388,7 +484485,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484388
484485
  },
484389
484486
  [addItem, pendingHistoryItemRef, setPendingHistoryItem, mergeThought]
484390
484487
  );
484391
- const handleUserCancelledEvent = (0, import_react152.useCallback)(
484488
+ const handleUserCancelledEvent = (0, import_react153.useCallback)(
484392
484489
  (userMessageTimestamp) => {
484393
484490
  if (turnCancelledRef.current) {
484394
484491
  return;
@@ -484425,7 +484522,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484425
484522
  clearRetryCountdown
484426
484523
  ]
484427
484524
  );
484428
- const handleErrorEvent = (0, import_react152.useCallback)(
484525
+ const handleErrorEvent = (0, import_react153.useCallback)(
484429
484526
  (eventValue, userMessageTimestamp) => {
484430
484527
  lastPromptErroredRef.current = true;
484431
484528
  if (pendingHistoryItemRef.current) {
@@ -484457,7 +484554,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484457
484554
  clearRetryCountdown
484458
484555
  ]
484459
484556
  );
484460
- const handleCitationEvent = (0, import_react152.useCallback)(
484557
+ const handleCitationEvent = (0, import_react153.useCallback)(
484461
484558
  (text, userMessageTimestamp) => {
484462
484559
  if (!showCitations(settings2)) {
484463
484560
  return;
@@ -484470,7 +484567,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484470
484567
  },
484471
484568
  [addItem, pendingHistoryItemRef, setPendingHistoryItem, settings2]
484472
484569
  );
484473
- const handleFinishedEvent = (0, import_react152.useCallback)(
484570
+ const handleFinishedEvent = (0, import_react153.useCallback)(
484474
484571
  (event, userMessageTimestamp) => {
484475
484572
  const finishReason = event.value.reason;
484476
484573
  if (!finishReason) {
@@ -484509,7 +484606,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484509
484606
  },
484510
484607
  [addItem, clearRetryCountdown]
484511
484608
  );
484512
- const handleChatCompressionEvent = (0, import_react152.useCallback)(
484609
+ const handleChatCompressionEvent = (0, import_react153.useCallback)(
484513
484610
  (eventValue, userMessageTimestamp) => {
484514
484611
  if (pendingHistoryItemRef.current) {
484515
484612
  addItem(pendingHistoryItemRef.current, userMessageTimestamp);
@@ -484525,7 +484622,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484525
484622
  },
484526
484623
  [addItem, config2, pendingHistoryItemRef, setPendingHistoryItem]
484527
484624
  );
484528
- const handleMaxSessionTurnsEvent = (0, import_react152.useCallback)(
484625
+ const handleMaxSessionTurnsEvent = (0, import_react153.useCallback)(
484529
484626
  () => addItem(
484530
484627
  {
484531
484628
  type: "info",
@@ -484535,7 +484632,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484535
484632
  ),
484536
484633
  [addItem, config2]
484537
484634
  );
484538
- const handleSessionTokenLimitExceededEvent = (0, import_react152.useCallback)(
484635
+ const handleSessionTokenLimitExceededEvent = (0, import_react153.useCallback)(
484539
484636
  (value) => addItem(
484540
484637
  {
484541
484638
  type: "error",
@@ -484550,7 +484647,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484550
484647
  ),
484551
484648
  [addItem]
484552
484649
  );
484553
- const handleLoopDetectionConfirmation = (0, import_react152.useCallback)(
484650
+ const handleLoopDetectionConfirmation = (0, import_react153.useCallback)(
484554
484651
  (result) => {
484555
484652
  setLoopDetectionConfirmationRequest(null);
484556
484653
  if (result.userSelection === "disable") {
@@ -484574,12 +484671,12 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484574
484671
  },
484575
484672
  [config2, addItem]
484576
484673
  );
484577
- const handleLoopDetectedEvent = (0, import_react152.useCallback)(() => {
484674
+ const handleLoopDetectedEvent = (0, import_react153.useCallback)(() => {
484578
484675
  setLoopDetectionConfirmationRequest({
484579
484676
  onComplete: handleLoopDetectionConfirmation
484580
484677
  });
484581
484678
  }, [handleLoopDetectionConfirmation]);
484582
- const processGeminiStreamEvents = (0, import_react152.useCallback)(
484679
+ const processGeminiStreamEvents = (0, import_react153.useCallback)(
484583
484680
  async (stream2, userMessageTimestamp, signal) => {
484584
484681
  let geminiMessageBuffer = "";
484585
484682
  let thoughtBuffer = "";
@@ -484760,7 +484857,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
484760
484857
  setPendingHistoryItem
484761
484858
  ]
484762
484859
  );
484763
- const submitQuery = (0, import_react152.useCallback)(
484860
+ const submitQuery = (0, import_react153.useCallback)(
484764
484861
  async (query, submitType = SendMessageType.UserQuery, prompt_id) => {
484765
484862
  const allowConcurrentBtwDuringResponse = submitType === SendMessageType.UserQuery && streamingState === "responding" /* Responding */ && typeof query === "string" && isBtwCommand(query);
484766
484863
  const bypassGuard = submitType === SendMessageType.ToolResult || allowConcurrentBtwDuringResponse;
@@ -484998,7 +485095,7 @@ ${preview}`
484998
485095
  setPendingRetryErrorItem
484999
485096
  ]
485000
485097
  );
485001
- const retryLastPrompt = (0, import_react152.useCallback)(async () => {
485098
+ const retryLastPrompt = (0, import_react153.useCallback)(async () => {
485002
485099
  if (streamingState === "responding" /* Responding */ || streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ || streamingState === "backgrounded" /* Backgrounded */) {
485003
485100
  return;
485004
485101
  }
@@ -485016,7 +485113,7 @@ ${preview}`
485016
485113
  clearRetryCountdown();
485017
485114
  await submitQuery(lastPrompt, SendMessageType.Retry);
485018
485115
  }, [streamingState, addItem, clearRetryCountdown, submitQuery]);
485019
- const handleApprovalModeChange = (0, import_react152.useCallback)(
485116
+ const handleApprovalModeChange = (0, import_react153.useCallback)(
485020
485117
  async (newApprovalMode) => {
485021
485118
  if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
485022
485119
  let awaitingApprovalCalls = toolCalls.filter(
@@ -485045,7 +485142,7 @@ ${preview}`
485045
485142
  },
485046
485143
  [toolCalls]
485047
485144
  );
485048
- const handleCompletedTools = (0, import_react152.useCallback)(
485145
+ const handleCompletedTools = (0, import_react153.useCallback)(
485049
485146
  async (completedToolCallsFromScheduler) => {
485050
485147
  if (isResponding) {
485051
485148
  pendingCompletedToolsRef.current.push(
@@ -485195,13 +485292,13 @@ ${verifyResult}` });
485195
485292
  ]
485196
485293
  );
485197
485294
  onCompleteFnRef.current = handleCompletedTools;
485198
- (0, import_react152.useEffect)(() => {
485295
+ (0, import_react153.useEffect)(() => {
485199
485296
  if (!isResponding && pendingCompletedToolsRef.current.length > 0) {
485200
485297
  const queued = pendingCompletedToolsRef.current.splice(0);
485201
485298
  void handleCompletedTools(queued);
485202
485299
  }
485203
485300
  }, [isResponding, handleCompletedTools]);
485204
- const pendingHistoryItems = (0, import_react152.useMemo)(
485301
+ const pendingHistoryItems = (0, import_react153.useMemo)(
485205
485302
  () => [
485206
485303
  pendingHistoryItem,
485207
485304
  pendingRetryErrorItem,
@@ -485215,7 +485312,7 @@ ${verifyResult}` });
485215
485312
  pendingToolCallGroupDisplay
485216
485313
  ]
485217
485314
  );
485218
- (0, import_react152.useEffect)(() => {
485315
+ (0, import_react153.useEffect)(() => {
485219
485316
  const saveRestorableToolCalls = /* @__PURE__ */ __name(async () => {
485220
485317
  if (!config2.getCheckpointingEnabled()) {
485221
485318
  return;
@@ -485318,9 +485415,9 @@ ${verifyResult}` });
485318
485415
  geminiClient,
485319
485416
  storage
485320
485417
  ]);
485321
- const cronQueueRef = (0, import_react152.useRef)([]);
485322
- const [cronTrigger, setCronTrigger] = (0, import_react152.useState)(0);
485323
- (0, import_react152.useEffect)(() => {
485418
+ const cronQueueRef = (0, import_react153.useRef)([]);
485419
+ const [cronTrigger, setCronTrigger] = (0, import_react153.useState)(0);
485420
+ (0, import_react153.useEffect)(() => {
485324
485421
  if (!config2.isCronEnabled()) return;
485325
485422
  const scheduler = config2.getCronScheduler();
485326
485423
  scheduler.start((job) => {
@@ -485335,13 +485432,13 @@ ${verifyResult}` });
485335
485432
  }
485336
485433
  };
485337
485434
  }, [config2]);
485338
- (0, import_react152.useEffect)(() => {
485435
+ (0, import_react153.useEffect)(() => {
485339
485436
  if (streamingState === "idle" /* Idle */ && cronQueueRef.current.length > 0) {
485340
485437
  const prompt = cronQueueRef.current.shift();
485341
485438
  submitQuery(prompt, SendMessageType.Cron);
485342
485439
  }
485343
485440
  }, [streamingState, submitQuery, cronTrigger]);
485344
- (0, import_react152.useEffect)(() => {
485441
+ (0, import_react153.useEffect)(() => {
485345
485442
  Promise.resolve().then(() => (init_dist4(), dist_exports)).then((core) => {
485346
485443
  core.initTimedMicrocompact?.();
485347
485444
  }).catch(() => {
@@ -485365,7 +485462,7 @@ ${verifyResult}` });
485365
485462
 
485366
485463
  // packages/cli/src/ui/hooks/vim.ts
485367
485464
  init_esbuild_shims();
485368
- var import_react153 = __toESM(require_react(), 1);
485465
+ var import_react154 = __toESM(require_react(), 1);
485369
485466
  init_dist4();
485370
485467
  var DIGIT_MULTIPLIER = 10;
485371
485468
  var DEFAULT_COUNT = 1;
@@ -485430,22 +485527,22 @@ var vimReducer = /* @__PURE__ */ __name((state, action) => {
485430
485527
  }, "vimReducer");
485431
485528
  function useVim(buffer, onSubmit) {
485432
485529
  const { vimEnabled, vimMode, setVimMode } = useVimMode();
485433
- const [state, dispatch] = (0, import_react153.useReducer)(vimReducer, initialVimState);
485434
- (0, import_react153.useEffect)(() => {
485530
+ const [state, dispatch] = (0, import_react154.useReducer)(vimReducer, initialVimState);
485531
+ (0, import_react154.useEffect)(() => {
485435
485532
  dispatch({ type: "SET_MODE", mode: vimMode });
485436
485533
  }, [vimMode]);
485437
- const updateMode = (0, import_react153.useCallback)(
485534
+ const updateMode = (0, import_react154.useCallback)(
485438
485535
  (mode) => {
485439
485536
  setVimMode(mode);
485440
485537
  dispatch({ type: "SET_MODE", mode });
485441
485538
  },
485442
485539
  [setVimMode]
485443
485540
  );
485444
- const getCurrentCount = (0, import_react153.useCallback)(
485541
+ const getCurrentCount = (0, import_react154.useCallback)(
485445
485542
  () => state.count || DEFAULT_COUNT,
485446
485543
  [state.count]
485447
485544
  );
485448
- const executeCommand = (0, import_react153.useCallback)(
485545
+ const executeCommand = (0, import_react154.useCallback)(
485449
485546
  (cmdType, count) => {
485450
485547
  switch (cmdType) {
485451
485548
  case CMD_TYPES.DELETE_WORD_FORWARD: {
@@ -485521,7 +485618,7 @@ function useVim(buffer, onSubmit) {
485521
485618
  },
485522
485619
  [buffer, updateMode]
485523
485620
  );
485524
- const handleInsertModeInput = (0, import_react153.useCallback)(
485621
+ const handleInsertModeInput = (0, import_react154.useCallback)(
485525
485622
  (normalizedKey) => {
485526
485623
  if (normalizedKey.name === "escape") {
485527
485624
  buffer.vimEscapeInsertMode();
@@ -485552,7 +485649,7 @@ function useVim(buffer, onSubmit) {
485552
485649
  },
485553
485650
  [buffer, dispatch, updateMode, onSubmit]
485554
485651
  );
485555
- const normalizeKey = (0, import_react153.useCallback)(
485652
+ const normalizeKey = (0, import_react154.useCallback)(
485556
485653
  (key) => ({
485557
485654
  name: key.name || "",
485558
485655
  sequence: key.sequence || "",
@@ -485563,7 +485660,7 @@ function useVim(buffer, onSubmit) {
485563
485660
  }),
485564
485661
  []
485565
485662
  );
485566
- const handleChangeMovement = (0, import_react153.useCallback)(
485663
+ const handleChangeMovement = (0, import_react154.useCallback)(
485567
485664
  (movement) => {
485568
485665
  const count = getCurrentCount();
485569
485666
  dispatch({ type: "CLEAR_COUNT" });
@@ -485584,7 +485681,7 @@ function useVim(buffer, onSubmit) {
485584
485681
  },
485585
485682
  [getCurrentCount, dispatch, buffer, updateMode]
485586
485683
  );
485587
- const handleOperatorMotion = (0, import_react153.useCallback)(
485684
+ const handleOperatorMotion = (0, import_react154.useCallback)(
485588
485685
  (operator2, motion) => {
485589
485686
  const count = getCurrentCount();
485590
485687
  const commandMap = {
@@ -485611,7 +485708,7 @@ function useVim(buffer, onSubmit) {
485611
485708
  },
485612
485709
  [getCurrentCount, executeCommand, dispatch]
485613
485710
  );
485614
- const handleInput = (0, import_react153.useCallback)(
485711
+ const handleInput = (0, import_react154.useCallback)(
485615
485712
  (key) => {
485616
485713
  if (!vimEnabled) {
485617
485714
  return false;
@@ -485911,7 +486008,7 @@ __name(useVim, "useVim");
485911
486008
 
485912
486009
  // packages/cli/src/ui/hooks/useAwaySummary.ts
485913
486010
  init_esbuild_shims();
485914
- var import_react154 = __toESM(require_react(), 1);
486011
+ var import_react155 = __toESM(require_react(), 1);
485915
486012
  init_dist4();
485916
486013
  var DEFAULT_AWAY_THRESHOLD_MINUTES = 5;
485917
486014
  var MIN_USER_MESSAGES_TO_FIRE = 3;
@@ -485943,15 +486040,15 @@ function useAwaySummary(options2) {
485943
486040
  history,
485944
486041
  awayThresholdMinutes
485945
486042
  } = 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);
486043
+ const blurredAtRef = (0, import_react155.useRef)(null);
486044
+ const recapPendingRef = (0, import_react155.useRef)(false);
486045
+ const inFlightRef = (0, import_react155.useRef)(null);
486046
+ const isIdleRef = (0, import_react155.useRef)(isIdle);
485950
486047
  isIdleRef.current = isIdle;
485951
- const historyRef = (0, import_react154.useRef)(history);
486048
+ const historyRef = (0, import_react155.useRef)(history);
485952
486049
  historyRef.current = history;
485953
486050
  const thresholdMs = (awayThresholdMinutes && awayThresholdMinutes > 0 ? awayThresholdMinutes : DEFAULT_AWAY_THRESHOLD_MINUTES) * 60 * 1e3;
485954
- (0, import_react154.useEffect)(() => {
486051
+ (0, import_react155.useEffect)(() => {
485955
486052
  if (!enabled || !config2) {
485956
486053
  inFlightRef.current?.abort();
485957
486054
  inFlightRef.current = null;
@@ -486003,7 +486100,7 @@ function useAwaySummary(options2) {
486003
486100
  recapPendingRef.current = false;
486004
486101
  });
486005
486102
  }, [enabled, config2, isFocused, isIdle, addItem, thresholdMs]);
486006
- (0, import_react154.useEffect)(
486103
+ (0, import_react155.useEffect)(
486007
486104
  () => () => {
486008
486105
  inFlightRef.current?.abort();
486009
486106
  },
@@ -486014,14 +486111,14 @@ __name(useAwaySummary, "useAwaySummary");
486014
486111
 
486015
486112
  // packages/cli/src/ui/hooks/useBracketedPaste.ts
486016
486113
  init_esbuild_shims();
486017
- var import_react155 = __toESM(require_react(), 1);
486114
+ var import_react156 = __toESM(require_react(), 1);
486018
486115
  var ENABLE_BRACKETED_PASTE = "\x1B[?2004h";
486019
486116
  var DISABLE_BRACKETED_PASTE = "\x1B[?2004l";
486020
486117
  var useBracketedPaste = /* @__PURE__ */ __name(() => {
486021
486118
  const cleanup = /* @__PURE__ */ __name(() => {
486022
486119
  process.stdout.write(DISABLE_BRACKETED_PASTE);
486023
486120
  }, "cleanup");
486024
- (0, import_react155.useEffect)(() => {
486121
+ (0, import_react156.useEffect)(() => {
486025
486122
  process.stdout.write(`\x1B[?2026h${ENABLE_BRACKETED_PASTE}\x1B[?2026l`);
486026
486123
  process.on("exit", cleanup);
486027
486124
  process.on("SIGINT", cleanup);
@@ -486037,7 +486134,7 @@ var useBracketedPaste = /* @__PURE__ */ __name(() => {
486037
486134
 
486038
486135
  // packages/cli/src/ui/hooks/useKeyboardHandling.ts
486039
486136
  init_esbuild_shims();
486040
- var import_react156 = __toESM(require_react(), 1);
486137
+ var import_react157 = __toESM(require_react(), 1);
486041
486138
  init_dist4();
486042
486139
  var CTRL_EXIT_PROMPT_DURATION_MS = 1e3;
486043
486140
  function useKeyboardHandling(params) {
@@ -486060,20 +486157,20 @@ function useKeyboardHandling(params) {
486060
486157
  debugKeystrokeLogging,
486061
486158
  onBackgroundSession
486062
486159
  } = 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) => {
486160
+ const [showToolDescriptions, setShowToolDescriptions] = (0, import_react157.useState)(false);
486161
+ const [ctrlCPressedOnce, setCtrlCPressedOnce] = (0, import_react157.useState)(false);
486162
+ const ctrlCTimerRef = (0, import_react157.useRef)(null);
486163
+ const [ctrlDPressedOnce, setCtrlDPressedOnce] = (0, import_react157.useState)(false);
486164
+ const ctrlDTimerRef = (0, import_react157.useRef)(null);
486165
+ const [escapePressedOnce, setEscapePressedOnce] = (0, import_react157.useState)(false);
486166
+ const escapeTimerRef = (0, import_react157.useRef)(null);
486167
+ const dialogsVisibleRef = (0, import_react157.useRef)(false);
486168
+ const [constrainHeight, setConstrainHeight] = (0, import_react157.useState)(true);
486169
+ const [showEscapePrompt, setShowEscapePrompt] = (0, import_react157.useState)(false);
486170
+ const handleEscapePromptChange = (0, import_react157.useCallback)((showPrompt) => {
486074
486171
  setShowEscapePrompt(showPrompt);
486075
486172
  }, []);
486076
- const globalKeypressHandlerRef = (0, import_react156.useRef)(() => {
486173
+ const globalKeypressHandlerRef = (0, import_react157.useRef)(() => {
486077
486174
  });
486078
486175
  globalKeypressHandlerRef.current = (key) => {
486079
486176
  if (debugKeystrokeLogging) {
@@ -486183,7 +486280,7 @@ function useKeyboardHandling(params) {
486183
486280
  return;
486184
486281
  }
486185
486282
  };
486186
- const handleGlobalKeypress = (0, import_react156.useCallback)(
486283
+ const handleGlobalKeypress = (0, import_react157.useCallback)(
486187
486284
  (key) => globalKeypressHandlerRef.current(key),
486188
486285
  []
486189
486286
  );
@@ -486208,22 +486305,22 @@ init_esbuild_shims();
486208
486305
 
486209
486306
  // packages/cli/src/ui/hooks/usePhraseCycler.ts
486210
486307
  init_esbuild_shims();
486211
- var import_react157 = __toESM(require_react(), 1);
486308
+ var import_react158 = __toESM(require_react(), 1);
486212
486309
  var WITTY_LOADING_PHRASES = ["I'm Feeling Lucky"];
486213
486310
  var PHRASE_CHANGE_INTERVAL_MS = 15e3;
486214
486311
  var usePhraseCycler = /* @__PURE__ */ __name((isActive, isWaiting, customPhrases) => {
486215
- const loadingPhrases = (0, import_react157.useMemo)(() => {
486312
+ const loadingPhrases = (0, import_react158.useMemo)(() => {
486216
486313
  if (customPhrases && customPhrases.length > 0) {
486217
486314
  return customPhrases;
486218
486315
  }
486219
486316
  const translatedPhrases = ta("WITTY_LOADING_PHRASES");
486220
486317
  return translatedPhrases.length > 0 ? translatedPhrases : WITTY_LOADING_PHRASES;
486221
486318
  }, [customPhrases]);
486222
- const [currentLoadingPhrase, setCurrentLoadingPhrase] = (0, import_react157.useState)(
486319
+ const [currentLoadingPhrase, setCurrentLoadingPhrase] = (0, import_react158.useState)(
486223
486320
  loadingPhrases[0]
486224
486321
  );
486225
- const phraseIntervalRef = (0, import_react157.useRef)(null);
486226
- (0, import_react157.useEffect)(() => {
486322
+ const phraseIntervalRef = (0, import_react158.useRef)(null);
486323
+ (0, import_react158.useEffect)(() => {
486227
486324
  if (isWaiting) {
486228
486325
  setCurrentLoadingPhrase(t4("Waiting for user confirmation..."));
486229
486326
  if (phraseIntervalRef.current) {
@@ -486260,9 +486357,9 @@ var usePhraseCycler = /* @__PURE__ */ __name((isActive, isWaiting, customPhrases
486260
486357
  }, "usePhraseCycler");
486261
486358
 
486262
486359
  // packages/cli/src/ui/hooks/useLoadingIndicator.ts
486263
- var import_react158 = __toESM(require_react(), 1);
486360
+ var import_react159 = __toESM(require_react(), 1);
486264
486361
  var useLoadingIndicator = /* @__PURE__ */ __name((streamingState, customWittyPhrases, currentCandidatesTokens) => {
486265
- const [timerResetKey, setTimerResetKey] = (0, import_react158.useState)(0);
486362
+ const [timerResetKey, setTimerResetKey] = (0, import_react159.useState)(0);
486266
486363
  const isTimerActive = streamingState === "responding" /* Responding */;
486267
486364
  const elapsedTimeFromTimer = useTimer(isTimerActive, timerResetKey);
486268
486365
  const isPhraseCyclingActive = streamingState === "responding" /* Responding */;
@@ -486272,10 +486369,10 @@ var useLoadingIndicator = /* @__PURE__ */ __name((streamingState, customWittyPhr
486272
486369
  isWaiting,
486273
486370
  customWittyPhrases
486274
486371
  );
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)(() => {
486372
+ const [retainedElapsedTime, setRetainedElapsedTime] = (0, import_react159.useState)(0);
486373
+ const [taskStartTokens, setTaskStartTokens] = (0, import_react159.useState)(0);
486374
+ const prevStreamingStateRef = (0, import_react159.useRef)(null);
486375
+ (0, import_react159.useEffect)(() => {
486279
486376
  if (prevStreamingStateRef.current === "waiting_for_confirmation" /* WaitingForConfirmation */ && streamingState === "responding" /* Responding */) {
486280
486377
  setTimerResetKey((prevKey) => prevKey + 1);
486281
486378
  setRetainedElapsedTime(0);
@@ -486300,20 +486397,20 @@ var useLoadingIndicator = /* @__PURE__ */ __name((streamingState, customWittyPhr
486300
486397
 
486301
486398
  // packages/cli/src/ui/hooks/useFolderTrust.ts
486302
486399
  init_esbuild_shims();
486303
- var import_react159 = __toESM(require_react(), 1);
486400
+ var import_react160 = __toESM(require_react(), 1);
486304
486401
  import * as process38 from "node:process";
486305
486402
  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);
486403
+ const [isTrusted, setIsTrusted] = (0, import_react160.useState)(void 0);
486404
+ const [isFolderTrustDialogOpen, setIsFolderTrustDialogOpen] = (0, import_react160.useState)(false);
486405
+ const [isRestarting, setIsRestarting] = (0, import_react160.useState)(false);
486309
486406
  const folderTrust = settings2.merged.security?.folderTrust?.enabled;
486310
- (0, import_react159.useEffect)(() => {
486407
+ (0, import_react160.useEffect)(() => {
486311
486408
  const { isTrusted: trusted } = isWorkspaceTrusted(settings2.merged);
486312
486409
  setIsTrusted(trusted);
486313
486410
  setIsFolderTrustDialogOpen(trusted === void 0);
486314
486411
  onTrustChange(trusted);
486315
486412
  }, [folderTrust, onTrustChange, settings2.merged]);
486316
- const handleFolderTrustSelect = (0, import_react159.useCallback)(
486413
+ const handleFolderTrustSelect = (0, import_react160.useCallback)(
486317
486414
  (choice2) => {
486318
486415
  const trustedFolders = loadTrustedFolders();
486319
486416
  const cwd6 = process38.cwd();
@@ -486356,7 +486453,7 @@ var useFolderTrust = /* @__PURE__ */ __name((settings2, onTrustChange) => {
486356
486453
 
486357
486454
  // packages/cli/src/ui/hooks/useCommandMigration.ts
486358
486455
  init_esbuild_shims();
486359
- var import_react160 = __toESM(require_react(), 1);
486456
+ var import_react161 = __toESM(require_react(), 1);
486360
486457
  init_dist4();
486361
486458
 
486362
486459
  // packages/cli/src/services/command-migration-tool.ts
@@ -486430,9 +486527,9 @@ __name(migrateTomlCommands, "migrateTomlCommands");
486430
486527
 
486431
486528
  // packages/cli/src/ui/hooks/useCommandMigration.ts
486432
486529
  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)(() => {
486530
+ const [showMigrationNudge, setShowMigrationNudge] = (0, import_react161.useState)(false);
486531
+ const [tomlFiles, setTomlFiles] = (0, import_react161.useState)([]);
486532
+ (0, import_react161.useEffect)(() => {
486436
486533
  const checkTomlCommands = /* @__PURE__ */ __name(async () => {
486437
486534
  const allFiles = [];
486438
486535
  const workspaceCommandsDir = storage.getProjectCommandsDir();
@@ -486458,9 +486555,9 @@ __name(useCommandMigration, "useCommandMigration");
486458
486555
 
486459
486556
  // packages/cli/src/ui/hooks/useIdleMessageDrain.ts
486460
486557
  init_esbuild_shims();
486461
- var import_react161 = __toESM(require_react(), 1);
486558
+ var import_react162 = __toESM(require_react(), 1);
486462
486559
  function useIdleMessageDrain(isConfigInitialized, streamingState, messageQueue, drain, submitQuery) {
486463
- (0, import_react161.useEffect)(() => {
486560
+ (0, import_react162.useEffect)(() => {
486464
486561
  if (isConfigInitialized && streamingState === "idle" /* Idle */ && messageQueue.length > 0) {
486465
486562
  const combined = messageQueue.join("\n\n");
486466
486563
  drain();
@@ -486472,7 +486569,7 @@ __name(useIdleMessageDrain, "useIdleMessageDrain");
486472
486569
 
486473
486570
  // packages/cli/src/ui/hooks/useWindowTitle.ts
486474
486571
  init_esbuild_shims();
486475
- var import_react162 = __toESM(require_react(), 1);
486572
+ var import_react163 = __toESM(require_react(), 1);
486476
486573
  import { basename as basename31 } from "node:path";
486477
486574
 
486478
486575
  // packages/cli/src/utils/windowTitle.ts
@@ -486489,9 +486586,9 @@ __name(computeWindowTitle, "computeWindowTitle");
486489
486586
 
486490
486587
  // packages/cli/src/ui/hooks/useWindowTitle.ts
486491
486588
  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)(() => {
486589
+ const originalTitleRef = (0, import_react163.useRef)(computeWindowTitle(basename31(targetDir)));
486590
+ const lastTitleRef = (0, import_react163.useRef)(null);
486591
+ (0, import_react163.useEffect)(() => {
486495
486592
  if (!settings2.merged.ui?.showStatusInTitle || settings2.merged.ui?.hideWindowTitle)
486496
486593
  return;
486497
486594
  let title;
@@ -486518,11 +486615,11 @@ __name(useWindowTitle, "useWindowTitle");
486518
486615
 
486519
486616
  // packages/cli/src/ui/hooks/useInitializationEffects.ts
486520
486617
  init_esbuild_shims();
486521
- var import_react163 = __toESM(require_react(), 1);
486618
+ var import_react164 = __toESM(require_react(), 1);
486522
486619
  init_dist4();
486523
486620
  var debugLogger159 = createDebugLogger("APP_CONTAINER");
486524
486621
  function useInitializationEffects(config2, historyManager, setConfigInitialized, setSessionName) {
486525
- (0, import_react163.useEffect)(() => {
486622
+ (0, import_react164.useEffect)(() => {
486526
486623
  (async () => {
486527
486624
  await config2.initialize();
486528
486625
  setConfigInitialized(true);
@@ -486596,7 +486693,7 @@ __name(useInitializationEffects, "useInitializationEffects");
486596
486693
 
486597
486694
  // packages/cli/src/ui/hooks/usePromptSuggestions.ts
486598
486695
  init_esbuild_shims();
486599
- var import_react164 = __toESM(require_react(), 1);
486696
+ var import_react165 = __toESM(require_react(), 1);
486600
486697
  init_dist4();
486601
486698
  function usePromptSuggestions(params) {
486602
486699
  const {
@@ -486612,17 +486709,17 @@ function usePromptSuggestions(params) {
486612
486709
  settingInputRequests,
486613
486710
  pendingGeminiHistoryItems
486614
486711
  } = 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)(() => {
486712
+ const [promptSuggestion, setPromptSuggestion] = (0, import_react165.useState)(null);
486713
+ const prevStreamingStateRef = (0, import_react165.useRef)("idle" /* Idle */);
486714
+ const speculationRef = (0, import_react165.useRef)(IDLE_SPECULATION);
486715
+ const suggestionAbortRef = (0, import_react165.useRef)(null);
486716
+ const dismissPromptSuggestion = (0, import_react165.useCallback)(() => {
486620
486717
  setPromptSuggestion(null);
486621
486718
  suggestionAbortRef.current?.abort();
486622
486719
  suggestionAbortRef.current = null;
486623
486720
  }, []);
486624
486721
  const followupSuggestionsEnabled = settings2.merged.ui?.enableFollowupSuggestions !== false;
486625
- (0, import_react164.useEffect)(() => {
486722
+ (0, import_react165.useEffect)(() => {
486626
486723
  if (!followupSuggestionsEnabled) {
486627
486724
  suggestionAbortRef.current?.abort();
486628
486725
  setPromptSuggestion(null);
@@ -486695,7 +486792,7 @@ function usePromptSuggestions(params) {
486695
486792
  isPermissionsDialogOpen,
486696
486793
  settingInputRequests
486697
486794
  ]);
486698
- (0, import_react164.useEffect)(() => {
486795
+ (0, import_react165.useEffect)(() => {
486699
486796
  if (!promptSuggestion && speculationRef.current.status !== "idle") {
486700
486797
  abortSpeculation(speculationRef.current).catch(() => {
486701
486798
  });
@@ -486713,7 +486810,7 @@ __name(usePromptSuggestions, "usePromptSuggestions");
486713
486810
 
486714
486811
  // packages/cli/src/ui/hooks/useExitHandling.ts
486715
486812
  init_esbuild_shims();
486716
- var import_react165 = __toESM(require_react(), 1);
486813
+ var import_react166 = __toESM(require_react(), 1);
486717
486814
  function useExitHandling(params) {
486718
486815
  const {
486719
486816
  isAuthDialogOpen,
@@ -486723,7 +486820,7 @@ function useExitHandling(params) {
486723
486820
  cancelOngoingRequest,
486724
486821
  buffer
486725
486822
  } = params;
486726
- const handleExit = (0, import_react165.useCallback)(
486823
+ const handleExit = (0, import_react166.useCallback)(
486727
486824
  (pressedOnce, setPressedOnce, timerRef) => {
486728
486825
  if (pressedOnce) {
486729
486826
  if (timerRef.current) {
@@ -486778,7 +486875,7 @@ init_esbuild_shims();
486778
486875
  init_esbuild_shims();
486779
486876
  import process47 from "node:process";
486780
486877
  import { spawn as spawn12 } from "node:child_process";
486781
- import { fileURLToPath as fileURLToPath18 } from "node:url";
486878
+ import { fileURLToPath as fileURLToPath17 } from "node:url";
486782
486879
  import path146 from "node:path";
486783
486880
  import { format as format3 } from "node:util";
486784
486881
 
@@ -488824,7 +488921,7 @@ var isNpmOrYarn = isNpm || isYarn;
488824
488921
  init_esbuild_shims();
488825
488922
  import fs132 from "node:fs";
488826
488923
  import path145 from "node:path";
488827
- import { fileURLToPath as fileURLToPath17 } from "node:url";
488924
+ import { fileURLToPath as fileURLToPath16 } from "node:url";
488828
488925
 
488829
488926
  // node_modules/global-directory/index.js
488830
488927
  init_esbuild_shims();
@@ -488931,7 +489028,7 @@ function isPathInside(childPath, parentPath) {
488931
489028
  __name(isPathInside, "isPathInside");
488932
489029
 
488933
489030
  // node_modules/is-installed-globally/index.js
488934
- var __dirname7 = path145.dirname(fileURLToPath17(import.meta.url));
489031
+ var __dirname7 = path145.dirname(fileURLToPath16(import.meta.url));
488935
489032
  var isInstalledGlobally = (() => {
488936
489033
  try {
488937
489034
  return isPathInside(__dirname7, global_directory_default.yarn.packages) || isPathInside(__dirname7, fs132.realpathSync(global_directory_default.npm.packages));
@@ -489429,7 +489526,7 @@ function pupa(template, data, { ignoreMissing = false, transform: transform2 = /
489429
489526
  __name(pupa, "pupa");
489430
489527
 
489431
489528
  // node_modules/update-notifier/update-notifier.js
489432
- var __dirname8 = path146.dirname(fileURLToPath18(import.meta.url));
489529
+ var __dirname8 = path146.dirname(fileURLToPath17(import.meta.url));
489433
489530
  var ONE_DAY = 1e3 * 60 * 60 * 24;
489434
489531
  var UpdateNotifier = class {
489435
489532
  static {
@@ -489866,7 +489963,7 @@ __name(setUpdateHandler, "setUpdateHandler");
489866
489963
 
489867
489964
  // packages/cli/src/ui/hooks/useMessageQueue.ts
489868
489965
  init_esbuild_shims();
489869
- var import_react166 = __toESM(require_react(), 1);
489966
+ var import_react167 = __toESM(require_react(), 1);
489870
489967
  var MessageQueueStore = class {
489871
489968
  static {
489872
489969
  __name(this, "MessageQueueStore");
@@ -489920,15 +490017,15 @@ var MessageQueueStore = class {
489920
490017
  }
489921
490018
  };
489922
490019
  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)(
490020
+ const store = (0, import_react167.useMemo)(() => new MessageQueueStore(), []);
490021
+ const messageQueue = (0, import_react167.useSyncExternalStore)(store.subscribe, store.getSnapshot);
490022
+ const addMessage = (0, import_react167.useCallback)(
489926
490023
  (message) => store.addMessage(message),
489927
490024
  [store]
489928
490025
  );
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]);
490026
+ const clearQueue = (0, import_react167.useCallback)(() => store.clearQueue(), [store]);
490027
+ const popLast = (0, import_react167.useCallback)(() => store.popLast(), [store]);
490028
+ const drain = (0, import_react167.useCallback)(() => store.drain(), [store]);
489932
490029
  return { messageQueue, addMessage, clearQueue, popLast, drain };
489933
490030
  }
489934
490031
  __name(useMessageQueue, "useMessageQueue");
@@ -489936,7 +490033,7 @@ __name(useMessageQueue, "useMessageQueue");
489936
490033
  // packages/cli/src/ui/hooks/useAutoAcceptIndicator.ts
489937
490034
  init_esbuild_shims();
489938
490035
  init_dist4();
489939
- var import_react167 = __toESM(require_react(), 1);
490036
+ var import_react168 = __toESM(require_react(), 1);
489940
490037
  function useAutoAcceptIndicator({
489941
490038
  config: config2,
489942
490039
  addItem,
@@ -489945,8 +490042,8 @@ function useAutoAcceptIndicator({
489945
490042
  disabled
489946
490043
  }) {
489947
490044
  const currentConfigValue = config2.getApprovalMode();
489948
- const [showAutoAcceptIndicator, setShowAutoAcceptIndicator] = (0, import_react167.useState)(currentConfigValue);
489949
- (0, import_react167.useEffect)(() => {
490045
+ const [showAutoAcceptIndicator, setShowAutoAcceptIndicator] = (0, import_react168.useState)(currentConfigValue);
490046
+ (0, import_react168.useEffect)(() => {
489950
490047
  setShowAutoAcceptIndicator(currentConfigValue);
489951
490048
  }, [currentConfigValue]);
489952
490049
  useKeypress(
@@ -489984,7 +490081,7 @@ __name(useAutoAcceptIndicator, "useAutoAcceptIndicator");
489984
490081
 
489985
490082
  // packages/cli/src/ui/hooks/useExtensionUpdates.ts
489986
490083
  init_esbuild_shims();
489987
- var import_react168 = __toESM(require_react(), 1);
490084
+ var import_react169 = __toESM(require_react(), 1);
489988
490085
  function confirmationRequestsReducer(state, action) {
489989
490086
  switch (action.type) {
489990
490087
  case "add":
@@ -490001,8 +490098,8 @@ var useConfirmUpdateRequests = /* @__PURE__ */ __name(() => {
490001
490098
  const [
490002
490099
  confirmUpdateExtensionRequests,
490003
490100
  dispatchConfirmUpdateExtensionRequests
490004
- ] = (0, import_react168.useReducer)(confirmationRequestsReducer, []);
490005
- const addConfirmUpdateExtensionRequest = (0, import_react168.useCallback)(
490101
+ ] = (0, import_react169.useReducer)(confirmationRequestsReducer, []);
490102
+ const addConfirmUpdateExtensionRequest = (0, import_react169.useCallback)(
490006
490103
  (original) => {
490007
490104
  const wrappedRequest = {
490008
490105
  prompt: original.prompt,
@@ -490040,11 +490137,11 @@ function settingInputRequestsReducer(state, action) {
490040
490137
  }
490041
490138
  __name(settingInputRequestsReducer, "settingInputRequestsReducer");
490042
490139
  var useSettingInputRequests = /* @__PURE__ */ __name(() => {
490043
- const [settingInputRequests, dispatchSettingInputRequests] = (0, import_react168.useReducer)(
490140
+ const [settingInputRequests, dispatchSettingInputRequests] = (0, import_react169.useReducer)(
490044
490141
  settingInputRequestsReducer,
490045
490142
  []
490046
490143
  );
490047
- const addSettingInputRequest = (0, import_react168.useCallback)(
490144
+ const addSettingInputRequest = (0, import_react169.useCallback)(
490048
490145
  (original) => {
490049
490146
  const wrappedRequest = {
490050
490147
  settingName: original.settingName,
@@ -490091,11 +490188,11 @@ function pluginChoiceRequestsReducer(state, action) {
490091
490188
  }
490092
490189
  __name(pluginChoiceRequestsReducer, "pluginChoiceRequestsReducer");
490093
490190
  var usePluginChoiceRequests = /* @__PURE__ */ __name(() => {
490094
- const [pluginChoiceRequests, dispatchPluginChoiceRequests] = (0, import_react168.useReducer)(
490191
+ const [pluginChoiceRequests, dispatchPluginChoiceRequests] = (0, import_react169.useReducer)(
490095
490192
  pluginChoiceRequestsReducer,
490096
490193
  []
490097
490194
  );
490098
- const addPluginChoiceRequest = (0, import_react168.useCallback)(
490195
+ const addPluginChoiceRequest = (0, import_react169.useCallback)(
490099
490196
  (original) => {
490100
490197
  const wrappedRequest = {
490101
490198
  marketplaceName: original.marketplaceName,
@@ -490129,12 +490226,12 @@ var usePluginChoiceRequests = /* @__PURE__ */ __name(() => {
490129
490226
  };
490130
490227
  }, "usePluginChoiceRequests");
490131
490228
  var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd6) => {
490132
- const [extensionsUpdateState, dispatchExtensionStateUpdate] = (0, import_react168.useReducer)(
490229
+ const [extensionsUpdateState, dispatchExtensionStateUpdate] = (0, import_react169.useReducer)(
490133
490230
  extensionUpdatesReducer,
490134
490231
  initialExtensionUpdatesState
490135
490232
  );
490136
490233
  const extensions = extensionManager.getLoadedExtensions();
490137
- (0, import_react168.useEffect)(() => {
490234
+ (0, import_react169.useEffect)(() => {
490138
490235
  (async () => {
490139
490236
  const extensionsToCheck = extensions.filter((extension) => {
490140
490237
  const currentStatus = extensionsUpdateState.extensionStatuses.get(
@@ -490162,7 +490259,7 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
490162
490259
  extensionsUpdateState.extensionStatuses,
490163
490260
  dispatchExtensionStateUpdate
490164
490261
  ]);
490165
- (0, import_react168.useEffect)(() => {
490262
+ (0, import_react169.useEffect)(() => {
490166
490263
  if (extensionsUpdateState.batchChecksInProgress > 0) {
490167
490264
  return;
490168
490265
  }
@@ -490221,7 +490318,7 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
490221
490318
  );
490222
490319
  }
490223
490320
  }, [extensions, extensionManager, extensionsUpdateState, addItem, cwd6]);
490224
- const extensionsUpdateStateComputed = (0, import_react168.useMemo)(() => {
490321
+ const extensionsUpdateStateComputed = (0, import_react169.useMemo)(() => {
490225
490322
  const result = /* @__PURE__ */ new Map();
490226
490323
  for (const [
490227
490324
  key,
@@ -490240,15 +490337,15 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
490240
490337
 
490241
490338
  // packages/cli/src/ui/hooks/useWelcomeBack.ts
490242
490339
  init_esbuild_shims();
490243
- var import_react169 = __toESM(require_react(), 1);
490340
+ var import_react170 = __toESM(require_react(), 1);
490244
490341
  init_dist4();
490245
490342
  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 () => {
490343
+ const [welcomeBackInfo, setWelcomeBackInfo] = (0, import_react170.useState)(null);
490344
+ const [showWelcomeBackDialog, setShowWelcomeBackDialog] = (0, import_react170.useState)(false);
490345
+ const [welcomeBackChoice, setWelcomeBackChoice] = (0, import_react170.useState)(null);
490346
+ const [shouldFillInput, setShouldFillInput] = (0, import_react170.useState)(false);
490347
+ const [inputFillText, setInputFillText] = (0, import_react170.useState)(null);
490348
+ const checkWelcomeBack = (0, import_react170.useCallback)(async () => {
490252
490349
  if (settings2.ui?.enableWelcomeBack === false) {
490253
490350
  return;
490254
490351
  }
@@ -490262,7 +490359,7 @@ function useWelcomeBack(config2, submitQuery, buffer, settings2) {
490262
490359
  config2.getDebugLogger().debug("Welcome back check failed:", error40);
490263
490360
  }
490264
490361
  }, [config2, settings2.ui?.enableWelcomeBack]);
490265
- const handleWelcomeBackSelection = (0, import_react169.useCallback)(
490362
+ const handleWelcomeBackSelection = (0, import_react170.useCallback)(
490266
490363
  (choice2) => {
490267
490364
  setWelcomeBackChoice(choice2);
490268
490365
  setShowWelcomeBackDialog(false);
@@ -490274,21 +490371,21 @@ function useWelcomeBack(config2, submitQuery, buffer, settings2) {
490274
490371
  },
490275
490372
  [welcomeBackInfo]
490276
490373
  );
490277
- const handleWelcomeBackClose = (0, import_react169.useCallback)(() => {
490374
+ const handleWelcomeBackClose = (0, import_react170.useCallback)(() => {
490278
490375
  setWelcomeBackChoice("restart");
490279
490376
  setShowWelcomeBackDialog(false);
490280
490377
  }, []);
490281
- const clearInputFill = (0, import_react169.useCallback)(() => {
490378
+ const clearInputFill = (0, import_react170.useCallback)(() => {
490282
490379
  setShouldFillInput(false);
490283
490380
  setInputFillText(null);
490284
490381
  }, []);
490285
- (0, import_react169.useEffect)(() => {
490382
+ (0, import_react170.useEffect)(() => {
490286
490383
  if (shouldFillInput && inputFillText) {
490287
490384
  buffer.setText(inputFillText);
490288
490385
  clearInputFill();
490289
490386
  }
490290
490387
  }, [shouldFillInput, inputFillText, buffer, clearInputFill]);
490291
- (0, import_react169.useEffect)(() => {
490388
+ (0, import_react170.useEffect)(() => {
490292
490389
  checkWelcomeBack();
490293
490390
  }, [checkWelcomeBack]);
490294
490391
  return {
@@ -490309,9 +490406,9 @@ __name(useWelcomeBack, "useWelcomeBack");
490309
490406
 
490310
490407
  // packages/cli/src/ui/hooks/useDialogClose.ts
490311
490408
  init_esbuild_shims();
490312
- var import_react170 = __toESM(require_react(), 1);
490409
+ var import_react171 = __toESM(require_react(), 1);
490313
490410
  function useDialogClose(options2) {
490314
- const closeAnyOpenDialog = (0, import_react170.useCallback)(() => {
490411
+ const closeAnyOpenDialog = (0, import_react171.useCallback)(() => {
490315
490412
  if (options2.isThemeDialogOpen) {
490316
490413
  options2.handleThemeSelect(void 0, "User" /* User */);
490317
490414
  return true;
@@ -490347,14 +490444,14 @@ __name(useDialogClose, "useDialogClose");
490347
490444
 
490348
490445
  // packages/cli/src/ui/hooks/useInitializationAuthError.ts
490349
490446
  init_esbuild_shims();
490350
- var import_react171 = __toESM(require_react(), 1);
490447
+ var import_react172 = __toESM(require_react(), 1);
490351
490448
  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);
490449
+ const hasHandled = (0, import_react172.useRef)(false);
490450
+ const authErrorRef = (0, import_react172.useRef)(authError);
490451
+ const onAuthErrorRef = (0, import_react172.useRef)(onAuthError);
490355
490452
  authErrorRef.current = authError;
490356
490453
  onAuthErrorRef.current = onAuthError;
490357
- (0, import_react171.useEffect)(() => {
490454
+ (0, import_react172.useEffect)(() => {
490358
490455
  if (hasHandled.current) {
490359
490456
  return;
490360
490457
  }
@@ -490367,13 +490464,13 @@ var useInitializationAuthError = /* @__PURE__ */ __name((authError, onAuthError)
490367
490464
 
490368
490465
  // packages/cli/src/ui/hooks/useSubagentCreateDialog.ts
490369
490466
  init_esbuild_shims();
490370
- var import_react172 = __toESM(require_react(), 1);
490467
+ var import_react173 = __toESM(require_react(), 1);
490371
490468
  function useSubagentCreateDialog() {
490372
- const [isSubagentCreateDialogOpen, setIsSubagentCreateDialogOpen] = (0, import_react172.useState)(false);
490373
- const openSubagentCreateDialog = (0, import_react172.useCallback)(() => {
490469
+ const [isSubagentCreateDialogOpen, setIsSubagentCreateDialogOpen] = (0, import_react173.useState)(false);
490470
+ const openSubagentCreateDialog = (0, import_react173.useCallback)(() => {
490374
490471
  setIsSubagentCreateDialogOpen(true);
490375
490472
  }, []);
490376
- const closeSubagentCreateDialog = (0, import_react172.useCallback)(() => {
490473
+ const closeSubagentCreateDialog = (0, import_react173.useCallback)(() => {
490377
490474
  setIsSubagentCreateDialogOpen(false);
490378
490475
  }, []);
490379
490476
  return {
@@ -490386,13 +490483,13 @@ __name(useSubagentCreateDialog, "useSubagentCreateDialog");
490386
490483
 
490387
490484
  // packages/cli/src/ui/hooks/useAgentsManagerDialog.ts
490388
490485
  init_esbuild_shims();
490389
- var import_react173 = __toESM(require_react(), 1);
490486
+ var import_react174 = __toESM(require_react(), 1);
490390
490487
  var useAgentsManagerDialog = /* @__PURE__ */ __name(() => {
490391
- const [isAgentsManagerDialogOpen, setIsAgentsManagerDialogOpen] = (0, import_react173.useState)(false);
490392
- const openAgentsManagerDialog = (0, import_react173.useCallback)(() => {
490488
+ const [isAgentsManagerDialogOpen, setIsAgentsManagerDialogOpen] = (0, import_react174.useState)(false);
490489
+ const openAgentsManagerDialog = (0, import_react174.useCallback)(() => {
490393
490490
  setIsAgentsManagerDialogOpen(true);
490394
490491
  }, []);
490395
- const closeAgentsManagerDialog = (0, import_react173.useCallback)(() => {
490492
+ const closeAgentsManagerDialog = (0, import_react174.useCallback)(() => {
490396
490493
  setIsAgentsManagerDialogOpen(false);
490397
490494
  }, []);
490398
490495
  return {
@@ -490404,13 +490501,13 @@ var useAgentsManagerDialog = /* @__PURE__ */ __name(() => {
490404
490501
 
490405
490502
  // packages/cli/src/ui/hooks/useExtensionsManagerDialog.ts
490406
490503
  init_esbuild_shims();
490407
- var import_react174 = __toESM(require_react(), 1);
490504
+ var import_react175 = __toESM(require_react(), 1);
490408
490505
  var useExtensionsManagerDialog = /* @__PURE__ */ __name(() => {
490409
- const [isExtensionsManagerDialogOpen, setIsExtensionsManagerDialogOpen] = (0, import_react174.useState)(false);
490410
- const openExtensionsManagerDialog = (0, import_react174.useCallback)(() => {
490506
+ const [isExtensionsManagerDialogOpen, setIsExtensionsManagerDialogOpen] = (0, import_react175.useState)(false);
490507
+ const openExtensionsManagerDialog = (0, import_react175.useCallback)(() => {
490411
490508
  setIsExtensionsManagerDialogOpen(true);
490412
490509
  }, []);
490413
- const closeExtensionsManagerDialog = (0, import_react174.useCallback)(() => {
490510
+ const closeExtensionsManagerDialog = (0, import_react175.useCallback)(() => {
490414
490511
  setIsExtensionsManagerDialogOpen(false);
490415
490512
  }, []);
490416
490513
  return {
@@ -490422,13 +490519,13 @@ var useExtensionsManagerDialog = /* @__PURE__ */ __name(() => {
490422
490519
 
490423
490520
  // packages/cli/src/ui/hooks/useMcpDialog.ts
490424
490521
  init_esbuild_shims();
490425
- var import_react175 = __toESM(require_react(), 1);
490522
+ var import_react176 = __toESM(require_react(), 1);
490426
490523
  var useMcpDialog = /* @__PURE__ */ __name(() => {
490427
- const [isMcpDialogOpen, setIsMcpDialogOpen] = (0, import_react175.useState)(false);
490428
- const openMcpDialog = (0, import_react175.useCallback)(() => {
490524
+ const [isMcpDialogOpen, setIsMcpDialogOpen] = (0, import_react176.useState)(false);
490525
+ const openMcpDialog = (0, import_react176.useCallback)(() => {
490429
490526
  setIsMcpDialogOpen(true);
490430
490527
  }, []);
490431
- const closeMcpDialog = (0, import_react175.useCallback)(() => {
490528
+ const closeMcpDialog = (0, import_react176.useCallback)(() => {
490432
490529
  setIsMcpDialogOpen(false);
490433
490530
  }, []);
490434
490531
  return {
@@ -490440,13 +490537,13 @@ var useMcpDialog = /* @__PURE__ */ __name(() => {
490440
490537
 
490441
490538
  // packages/cli/src/ui/hooks/useHooksDialog.ts
490442
490539
  init_esbuild_shims();
490443
- var import_react176 = __toESM(require_react(), 1);
490540
+ var import_react177 = __toESM(require_react(), 1);
490444
490541
  var useHooksDialog = /* @__PURE__ */ __name(() => {
490445
- const [isHooksDialogOpen, setIsHooksDialogOpen] = (0, import_react176.useState)(false);
490446
- const openHooksDialog = (0, import_react176.useCallback)(() => {
490542
+ const [isHooksDialogOpen, setIsHooksDialogOpen] = (0, import_react177.useState)(false);
490543
+ const openHooksDialog = (0, import_react177.useCallback)(() => {
490447
490544
  setIsHooksDialogOpen(true);
490448
490545
  }, []);
490449
- const closeHooksDialog = (0, import_react176.useCallback)(() => {
490546
+ const closeHooksDialog = (0, import_react177.useCallback)(() => {
490450
490547
  setIsHooksDialogOpen(false);
490451
490548
  }, []);
490452
490549
  return {
@@ -490458,7 +490555,7 @@ var useHooksDialog = /* @__PURE__ */ __name(() => {
490458
490555
 
490459
490556
  // packages/cli/src/ui/hooks/useAttentionNotifications.ts
490460
490557
  init_esbuild_shims();
490461
- var import_react177 = __toESM(require_react(), 1);
490558
+ var import_react178 = __toESM(require_react(), 1);
490462
490559
 
490463
490560
  // packages/cli/src/utils/attentionNotification.ts
490464
490561
  init_esbuild_shims();
@@ -490495,10 +490592,10 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
490495
490592
  config: config2
490496
490593
  }) => {
490497
490594
  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)(() => {
490595
+ const awaitingNotificationSentRef = (0, import_react178.useRef)(false);
490596
+ const respondingElapsedRef = (0, import_react178.useRef)(0);
490597
+ const idleNotificationSentRef = (0, import_react178.useRef)(false);
490598
+ (0, import_react178.useEffect)(() => {
490502
490599
  if (streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ && !isFocused && !awaitingNotificationSentRef.current) {
490503
490600
  notifyTerminalAttention("tool_approval" /* ToolApproval */, {
490504
490601
  enabled: terminalBellEnabled
@@ -490509,7 +490606,7 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
490509
490606
  awaitingNotificationSentRef.current = false;
490510
490607
  }
490511
490608
  }, [isFocused, streamingState, terminalBellEnabled]);
490512
- (0, import_react177.useEffect)(() => {
490609
+ (0, import_react178.useEffect)(() => {
490513
490610
  if (streamingState === "responding" /* Responding */) {
490514
490611
  respondingElapsedRef.current = elapsedTime;
490515
490612
  idleNotificationSentRef.current = false;
@@ -490545,7 +490642,7 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
490545
490642
 
490546
490643
  // packages/cli/src/ui/hooks/useVoice.ts
490547
490644
  init_esbuild_shims();
490548
- var import_react178 = __toESM(require_react(), 1);
490645
+ var import_react179 = __toESM(require_react(), 1);
490549
490646
  import os46 from "node:os";
490550
490647
  import path148 from "node:path";
490551
490648
  import fs135 from "node:fs";
@@ -490580,12 +490677,12 @@ __name(transcribe, "transcribe");
490580
490677
 
490581
490678
  // packages/cli/src/ui/hooks/useVoice.ts
490582
490679
  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 () => {
490680
+ const [voiceState, setVoiceState] = (0, import_react179.useState)("idle");
490681
+ const [error40, setError] = (0, import_react179.useState)(null);
490682
+ const procRef = (0, import_react179.useRef)(null);
490683
+ const audioPathRef = (0, import_react179.useRef)(null);
490684
+ const backend = (0, import_react179.useMemo)(() => detectBackend2(), []);
490685
+ const start2 = (0, import_react179.useCallback)(async () => {
490589
490686
  if (voiceState !== "idle") return;
490590
490687
  const tmpPath = path148.join(os46.tmpdir(), `proto-voice-${Date.now()}.wav`);
490591
490688
  audioPathRef.current = tmpPath;
@@ -490598,7 +490695,7 @@ function useVoice(sttEndpoint, sttApiKey) {
490598
490695
  setError(e4 instanceof Error ? e4.message : String(e4));
490599
490696
  }
490600
490697
  }, [voiceState, backend]);
490601
- const stop3 = (0, import_react178.useCallback)(async () => {
490698
+ const stop3 = (0, import_react179.useCallback)(async () => {
490602
490699
  if (voiceState !== "recording" || !procRef.current || !audioPathRef.current) {
490603
490700
  return "";
490604
490701
  }
@@ -490631,7 +490728,7 @@ function useVoice(sttEndpoint, sttApiKey) {
490631
490728
  return "";
490632
490729
  }
490633
490730
  }, [voiceState, sttEndpoint, sttApiKey]);
490634
- const reset = (0, import_react178.useCallback)(() => {
490731
+ const reset = (0, import_react179.useCallback)(() => {
490635
490732
  setVoiceState("idle");
490636
490733
  setError(null);
490637
490734
  }, []);
@@ -490647,7 +490744,7 @@ function useVoice(sttEndpoint, sttApiKey) {
490647
490744
  __name(useVoice, "useVoice");
490648
490745
 
490649
490746
  // packages/cli/src/ui/AppContainer.tsx
490650
- var import_jsx_runtime143 = __toESM(require_jsx_runtime(), 1);
490747
+ var import_jsx_runtime144 = __toESM(require_jsx_runtime(), 1);
490651
490748
  var debugLogger163 = createDebugLogger("APP_CONTAINER");
490652
490749
  function isToolExecuting(pendingHistoryItems) {
490653
490750
  return pendingHistoryItems.some((item) => {
@@ -490666,21 +490763,21 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
490666
490763
  const { settings: settings2, config: config2, initializationResult } = props;
490667
490764
  const historyManager = useHistory();
490668
490765
  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)(
490766
+ const [debugMessage, setDebugMessage] = (0, import_react180.useState)("");
490767
+ const [quittingMessages, setQuittingMessages] = (0, import_react180.useState)(null);
490768
+ const [themeError, setThemeError] = (0, import_react180.useState)(
490672
490769
  initializationResult.themeError
490673
490770
  );
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)(
490771
+ const [isProcessing, setIsProcessing] = (0, import_react180.useState)(false);
490772
+ const [embeddedShellFocused, setEmbeddedShellFocused] = (0, import_react180.useState)(false);
490773
+ const [geminiMdFileCount, setGeminiMdFileCount] = (0, import_react180.useState)(
490677
490774
  initializationResult.geminiMdFileCount
490678
490775
  );
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)(
490776
+ const [shellModeActive, setShellModeActive] = (0, import_react180.useState)(false);
490777
+ const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = (0, import_react180.useState)(false);
490778
+ const [historyRemountKey, setHistoryRemountKey] = (0, import_react180.useState)(0);
490779
+ const [updateInfo, setUpdateInfo] = (0, import_react180.useState)(null);
490780
+ const [isTrustedFolder, setIsTrustedFolder] = (0, import_react180.useState)(
490684
490781
  config2.isTrustedFolder()
490685
490782
  );
490686
490783
  const extensionManager = config2.getExtensionManager();
@@ -490735,43 +490832,43 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
490735
490832
  config2.getWorkingDir()
490736
490833
  );
490737
490834
  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)(
490835
+ const [isTrustDialogOpen, setTrustDialogOpen] = (0, import_react180.useState)(false);
490836
+ const openTrustDialog = (0, import_react180.useCallback)(() => setTrustDialogOpen(true), []);
490837
+ const closeTrustDialog = (0, import_react180.useCallback)(() => setTrustDialogOpen(false), []);
490838
+ const [isPermissionsDialogOpen, setPermissionsDialogOpen] = (0, import_react180.useState)(false);
490839
+ const openPermissionsDialog = (0, import_react180.useCallback)(
490743
490840
  () => setPermissionsDialogOpen(true),
490744
490841
  []
490745
490842
  );
490746
- const closePermissionsDialog = (0, import_react179.useCallback)(
490843
+ const closePermissionsDialog = (0, import_react180.useCallback)(
490747
490844
  () => setPermissionsDialogOpen(false),
490748
490845
  []
490749
490846
  );
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)([]);
490847
+ const [currentModel, setCurrentModel] = (0, import_react180.useState)(() => config2.getModel());
490848
+ const [isConfigInitialized, setConfigInitialized] = (0, import_react180.useState)(false);
490849
+ const [userMessages, setUserMessages] = (0, import_react180.useState)([]);
490753
490850
  const { columns: terminalWidth, rows: terminalHeight } = useTerminalSize();
490754
490851
  const { stdin: stdin3, setRawMode } = use_stdin_default();
490755
490852
  const { stdout: stdout3 } = use_stdout_default();
490756
490853
  const { stats: sessionStats, startNewSession } = useSessionStats();
490757
490854
  const logger10 = useLogger(config2.storage, sessionStats.sessionId);
490758
490855
  const branchName = useGitBranchName(config2.getTargetDir());
490759
- const mainControlsRef = (0, import_react179.useRef)(null);
490856
+ const mainControlsRef = (0, import_react180.useRef)(null);
490760
490857
  const staticExtraHeight = 3;
490761
- const [sessionName, setSessionName] = (0, import_react179.useState)(null);
490858
+ const [sessionName, setSessionName] = (0, import_react180.useState)(null);
490762
490859
  useInitializationEffects(
490763
490860
  config2,
490764
490861
  historyManager,
490765
490862
  setConfigInitialized,
490766
490863
  setSessionName
490767
490864
  );
490768
- (0, import_react179.useEffect)(
490865
+ (0, import_react180.useEffect)(
490769
490866
  () => setUpdateHandler(historyManager.addItem, setUpdateInfo),
490770
490867
  [historyManager.addItem]
490771
490868
  );
490772
490869
  const { lastFinished } = useBackgroundAgentProgress();
490773
490870
  const addHistoryItem = historyManager.addItem;
490774
- (0, import_react179.useEffect)(() => {
490871
+ (0, import_react180.useEffect)(() => {
490775
490872
  if (!lastFinished?.hitLimit) return;
490776
490873
  addHistoryItem(
490777
490874
  {
@@ -490781,19 +490878,19 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
490781
490878
  Date.now()
490782
490879
  );
490783
490880
  }, [lastFinished, addHistoryItem]);
490784
- (0, import_react179.useEffect)(() => {
490881
+ (0, import_react180.useEffect)(() => {
490785
490882
  const unsubscribe = config2.onModelChange((model) => {
490786
490883
  setCurrentModel(model);
490787
490884
  });
490788
490885
  return unsubscribe;
490789
490886
  }, [config2]);
490790
- const { inputWidth, suggestionsWidth } = (0, import_react179.useMemo)(() => {
490887
+ const { inputWidth, suggestionsWidth } = (0, import_react180.useMemo)(() => {
490791
490888
  const { inputWidth: inputWidth2, suggestionsWidth: suggestionsWidth2 } = calculatePromptWidths(terminalWidth);
490792
490889
  return { inputWidth: inputWidth2, suggestionsWidth: suggestionsWidth2 };
490793
490890
  }, [terminalWidth]);
490794
490891
  const mainAreaWidth = Math.min(terminalWidth - 4, 100);
490795
490892
  const staticAreaMaxItemHeight = Math.max(terminalHeight * 4, 100);
490796
- const isValidPath = (0, import_react179.useCallback)((filePath) => {
490893
+ const isValidPath = (0, import_react180.useCallback)((filePath) => {
490797
490894
  try {
490798
490895
  return fs136.existsSync(filePath) && fs136.statSync(filePath).isFile();
490799
490896
  } catch (_e2) {
@@ -490808,7 +490905,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
490808
490905
  isValidPath,
490809
490906
  shellModeActive
490810
490907
  });
490811
- (0, import_react179.useEffect)(() => {
490908
+ (0, import_react180.useEffect)(() => {
490812
490909
  const fetchUserMessages = /* @__PURE__ */ __name(async () => {
490813
490910
  const pastMessagesRaw = await logger10?.getPreviousUserMessages() || [];
490814
490911
  const currentSessionUserMessages = historyManager.history.filter(
@@ -490831,13 +490928,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
490831
490928
  }, "fetchUserMessages");
490832
490929
  fetchUserMessages();
490833
490930
  }, [historyManager.history, logger10]);
490834
- const refreshStatic = (0, import_react179.useCallback)(() => {
490931
+ const refreshStatic = (0, import_react180.useCallback)(() => {
490835
490932
  stdout3.write("\x1B[?2026h");
490836
490933
  stdout3.write(base_exports.clearTerminal);
490837
490934
  stdout3.write("\x1B[?2026l");
490838
490935
  setHistoryRemountKey((prev) => prev + 1);
490839
490936
  }, [setHistoryRemountKey, stdout3]);
490840
- (0, import_react179.useEffect)(() => {
490937
+ (0, import_react180.useEffect)(() => {
490841
490938
  const unsubscribe = config2.onModelChange((model) => {
490842
490939
  setCurrentModel((prev) => {
490843
490940
  if (prev === model) {
@@ -490879,7 +490976,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
490879
490976
  cancelAuthentication
490880
490977
  } = useAuthCommand(settings2, config2, historyManager.addItem, refreshStatic);
490881
490978
  useInitializationAuthError(initializationResult.authError, onAuthError);
490882
- (0, import_react179.useEffect)(() => {
490979
+ (0, import_react180.useEffect)(() => {
490883
490980
  const currentAuthType = config2.getModelsConfig().getCurrentAuthType();
490884
490981
  if (settings2.merged.security?.auth?.enforcedType && currentAuthType && settings2.merged.security?.auth.enforcedType !== currentAuthType) {
490885
490982
  onAuthError(
@@ -490905,7 +491002,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
490905
491002
  config2,
490906
491003
  onAuthError
490907
491004
  ]);
490908
- const [editorError, setEditorError] = (0, import_react179.useState)(null);
491005
+ const [editorError, setEditorError] = (0, import_react180.useState)(null);
490909
491006
  const {
490910
491007
  isEditorDialogOpen,
490911
491008
  openEditorDialog,
@@ -490960,10 +491057,10 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
490960
491057
  } = useExtensionsManagerDialog();
490961
491058
  const { isMcpDialogOpen, openMcpDialog, closeMcpDialog } = useMcpDialog();
490962
491059
  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)(
491060
+ const [isRewindDialogOpen, setIsRewindDialogOpen] = (0, import_react180.useState)(false);
491061
+ const openRewindDialog = (0, import_react180.useCallback)(() => setIsRewindDialogOpen(true), []);
491062
+ const closeRewindDialog = (0, import_react180.useCallback)(() => setIsRewindDialogOpen(false), []);
491063
+ const slashCommandActions = (0, import_react180.useMemo)(
490967
491064
  () => ({
490968
491065
  openAuthDialog,
490969
491066
  openThemeDialog,
@@ -491046,14 +491143,14 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491046
491143
  logger10,
491047
491144
  setSessionName
491048
491145
  );
491049
- const onDebugMessage = (0, import_react179.useCallback)(
491146
+ const onDebugMessage = (0, import_react180.useCallback)(
491050
491147
  (message) => {
491051
491148
  config2.getDebugLogger().debug(message);
491052
491149
  },
491053
491150
  [config2]
491054
491151
  );
491055
491152
  const stableAddItem = historyManager.addItem;
491056
- const performMemoryRefresh = (0, import_react179.useCallback)(async () => {
491153
+ const performMemoryRefresh = (0, import_react180.useCallback)(async () => {
491057
491154
  stableAddItem(
491058
491155
  {
491059
491156
  type: "info" /* INFO */,
@@ -491099,7 +491196,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491099
491196
  debugLogger163.error("Error refreshing memory:", error40);
491100
491197
  }
491101
491198
  }, [config2, stableAddItem, settings2.merged]);
491102
- const cancelHandlerRef = (0, import_react179.useRef)(() => {
491199
+ const cancelHandlerRef = (0, import_react180.useRef)(() => {
491103
491200
  });
491104
491201
  const { messageQueue, addMessage, popLast, drain } = useMessageQueue();
491105
491202
  const voiceEnabled = settings2.merged.voice?.enabled ?? false;
@@ -491151,7 +491248,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491151
491248
  drain,
491152
491249
  submitQuery
491153
491250
  );
491154
- const [hasSuggestionsVisible, setHasSuggestionsVisible] = (0, import_react179.useState)(false);
491251
+ const [hasSuggestionsVisible, setHasSuggestionsVisible] = (0, import_react180.useState)(false);
491155
491252
  const agentViewState = useAgentViewState();
491156
491253
  const geminiClient = config2.getGeminiClient();
491157
491254
  const showAutoAcceptIndicator = useAutoAcceptIndicator({
@@ -491179,7 +491276,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491179
491276
  settingInputRequests,
491180
491277
  pendingGeminiHistoryItems
491181
491278
  });
491182
- const handleFinalSubmit = (0, import_react179.useCallback)(
491279
+ const handleFinalSubmit = (0, import_react180.useCallback)(
491183
491280
  (submittedValue) => {
491184
491281
  if (agentViewState.activeView !== "main") {
491185
491282
  const agent = agentViewState.agents.get(agentViewState.activeView);
@@ -491287,7 +491384,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491287
491384
  speculationRef
491288
491385
  ]
491289
491386
  );
491290
- const handleArenaModelsSelected = (0, import_react179.useCallback)(
491387
+ const handleArenaModelsSelected = (0, import_react180.useCallback)(
491291
491388
  (models) => {
491292
491389
  const value = models.join(",");
491293
491390
  buffer.setText(`/arena start --models ${value} `);
@@ -491302,7 +491399,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491302
491399
  handleWelcomeBackSelection,
491303
491400
  handleWelcomeBackClose
491304
491401
  } = useWelcomeBack(config2, handleFinalSubmit, buffer, settings2.merged);
491305
- cancelHandlerRef.current = (0, import_react179.useCallback)(() => {
491402
+ cancelHandlerRef.current = (0, import_react180.useCallback)(() => {
491306
491403
  const pendingHistoryItems2 = [
491307
491404
  ...pendingSlashCommandHistoryItems,
491308
491405
  ...pendingGeminiHistoryItems
@@ -491327,15 +491424,15 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491327
491424
  pendingSlashCommandHistoryItems,
491328
491425
  pendingGeminiHistoryItems
491329
491426
  ]);
491330
- const handleClearScreen = (0, import_react179.useCallback)(() => {
491427
+ const handleClearScreen = (0, import_react180.useCallback)(() => {
491331
491428
  historyManager.clearItems();
491332
491429
  clearScreen2();
491333
491430
  refreshStatic();
491334
491431
  }, [historyManager, refreshStatic]);
491335
491432
  const { handleInput: vimHandleInput } = useVim(buffer, handleFinalSubmit);
491336
491433
  const isInputActive = !initError && !isProcessing && (streamingState === "idle" /* Idle */ || streamingState === "responding" /* Responding */);
491337
- const [controlsHeight, setControlsHeight] = (0, import_react179.useState)(0);
491338
- (0, import_react179.useLayoutEffect)(() => {
491434
+ const [controlsHeight, setControlsHeight] = (0, import_react180.useState)(0);
491435
+ (0, import_react180.useLayoutEffect)(() => {
491339
491436
  if (mainControlsRef.current) {
491340
491437
  const fullFooterMeasurement = measure_element_default(mainControlsRef.current);
491341
491438
  if (fullFooterMeasurement.height > 0) {
@@ -491368,13 +491465,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491368
491465
  history: historyManager.history,
491369
491466
  awayThresholdMinutes: settings2.merged.general?.sessionRecapAwayThresholdMinutes
491370
491467
  });
491371
- const contextFileNames = (0, import_react179.useMemo)(() => {
491468
+ const contextFileNames = (0, import_react180.useMemo)(() => {
491372
491469
  const fromSettings = settings2.merged.context?.fileName;
491373
491470
  return fromSettings ? Array.isArray(fromSettings) ? fromSettings : [fromSettings] : getAllGeminiMdFilenames();
491374
491471
  }, [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)(() => {
491472
+ const initialPrompt = (0, import_react180.useMemo)(() => config2.getQuestion(), [config2]);
491473
+ const initialPromptSubmitted = (0, import_react180.useRef)(false);
491474
+ (0, import_react180.useEffect)(() => {
491378
491475
  if (activePtyId) {
491379
491476
  ShellExecutionService.resizePty(
491380
491477
  activePtyId,
@@ -491383,7 +491480,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491383
491480
  );
491384
491481
  }
491385
491482
  }, [terminalWidth, availableTerminalHeight, activePtyId]);
491386
- (0, import_react179.useEffect)(() => {
491483
+ (0, import_react180.useEffect)(() => {
491387
491484
  if (initialPrompt && isConfigInitialized && !initialPromptSubmitted.current && !isAuthenticating && !isAuthDialogOpen && !isThemeDialogOpen && !isEditorDialogOpen && !showWelcomeBackDialog && welcomeBackChoice !== "restart" && geminiClient?.isInitialized?.()) {
491388
491485
  handleFinalSubmit(initialPrompt);
491389
491486
  initialPromptSubmitted.current = true;
@@ -491400,9 +491497,9 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491400
491497
  welcomeBackChoice,
491401
491498
  geminiClient
491402
491499
  ]);
491403
- const [idePromptAnswered, setIdePromptAnswered] = (0, import_react179.useState)(false);
491404
- const [currentIDE, setCurrentIDE] = (0, import_react179.useState)(null);
491405
- (0, import_react179.useEffect)(() => {
491500
+ const [idePromptAnswered, setIdePromptAnswered] = (0, import_react180.useState)(false);
491501
+ const [currentIDE, setCurrentIDE] = (0, import_react180.useState)(null);
491502
+ (0, import_react180.useEffect)(() => {
491406
491503
  const getIde = /* @__PURE__ */ __name(async () => {
491407
491504
  const ideClient = await IdeClient.getInstance();
491408
491505
  const currentIde = ideClient.getCurrentIde();
@@ -491418,24 +491515,24 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491418
491515
  tomlFiles: commandMigrationTomlFiles,
491419
491516
  setShowMigrationNudge: setShowCommandMigrationNudge
491420
491517
  } = useCommandMigration(settings2, config2.storage);
491421
- const [ideContextState, setIdeContextState] = (0, import_react179.useState)();
491422
- const [showIdeRestartPrompt, setShowIdeRestartPrompt] = (0, import_react179.useState)(false);
491518
+ const [ideContextState, setIdeContextState] = (0, import_react180.useState)();
491519
+ const [showIdeRestartPrompt, setShowIdeRestartPrompt] = (0, import_react180.useState)(false);
491423
491520
  const { isFolderTrustDialogOpen, handleFolderTrustSelect, isRestarting } = useFolderTrust(settings2, setIsTrustedFolder);
491424
491521
  const {
491425
491522
  needsRestart: ideNeedsRestart,
491426
491523
  restartReason: ideTrustRestartReason
491427
491524
  } = useIdeTrustListener();
491428
- (0, import_react179.useEffect)(() => {
491525
+ (0, import_react180.useEffect)(() => {
491429
491526
  if (ideNeedsRestart) {
491430
491527
  setShowIdeRestartPrompt(true);
491431
491528
  }
491432
491529
  }, [ideNeedsRestart]);
491433
- (0, import_react179.useEffect)(() => {
491530
+ (0, import_react180.useEffect)(() => {
491434
491531
  const unsubscribe = ideContextStore.subscribe(setIdeContextState);
491435
491532
  setIdeContextState(ideContextStore.get());
491436
491533
  return unsubscribe;
491437
491534
  }, []);
491438
- const handleIdePromptComplete = (0, import_react179.useCallback)(
491535
+ const handleIdePromptComplete = (0, import_react180.useCallback)(
491439
491536
  (result) => {
491440
491537
  if (result.userSelection === "yes") {
491441
491538
  if (result.isExtensionPreInstalled) {
@@ -491451,7 +491548,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
491451
491548
  },
491452
491549
  [handleSlashCommand2, settings2]
491453
491550
  );
491454
- const handleCommandMigrationComplete = (0, import_react179.useCallback)(
491551
+ const handleCommandMigrationComplete = (0, import_react180.useCallback)(
491455
491552
  async (result) => {
491456
491553
  setShowCommandMigrationNudge(false);
491457
491554
  if (result.userSelection === "yes") {
@@ -491610,11 +491707,11 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
491610
491707
  history: historyManager.history,
491611
491708
  sessionStats
491612
491709
  });
491613
- const pendingHistoryItems = (0, import_react179.useMemo)(
491710
+ const pendingHistoryItems = (0, import_react180.useMemo)(
491614
491711
  () => [...pendingSlashCommandHistoryItems, ...pendingGeminiHistoryItems],
491615
491712
  [pendingSlashCommandHistoryItems, pendingGeminiHistoryItems]
491616
491713
  );
491617
- const uiState = (0, import_react179.useMemo)(
491714
+ const uiState = (0, import_react180.useMemo)(
491618
491715
  () => ({
491619
491716
  history: historyManager.history,
491620
491717
  historyManager,
@@ -491849,7 +491946,7 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
491849
491946
  dismissPromptSuggestion
491850
491947
  ]
491851
491948
  );
491852
- const uiActions = (0, import_react179.useMemo)(
491949
+ const uiActions = (0, import_react180.useMemo)(
491853
491950
  () => ({
491854
491951
  openThemeDialog,
491855
491952
  openEditorDialog,
@@ -491994,23 +492091,23 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
491994
492091
  submitFeedback
491995
492092
  ]
491996
492093
  );
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)(
492094
+ 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
492095
  AppContext2.Provider,
491999
492096
  {
492000
492097
  value: {
492001
492098
  version: props.version,
492002
492099
  startupWarnings: props.startupWarnings || []
492003
492100
  },
492004
- children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(ShellFocusContext.Provider, { value: isFocused, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(App2, {}) })
492101
+ children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(ShellFocusContext.Provider, { value: isFocused, children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(App2, {}) })
492005
492102
  }
492006
492103
  ) }) }) });
492007
492104
  }, "AppContainer");
492008
492105
 
492009
492106
  // packages/cli/src/ui/hooks/useKittyKeyboardProtocol.ts
492010
492107
  init_esbuild_shims();
492011
- var import_react180 = __toESM(require_react(), 1);
492108
+ var import_react181 = __toESM(require_react(), 1);
492012
492109
  function useKittyKeyboardProtocol() {
492013
- const [status] = (0, import_react180.useState)({
492110
+ const [status] = (0, import_react181.useState)({
492014
492111
  supported: isKittyProtocolSupported(),
492015
492112
  enabled: isKittyProtocolEnabled(),
492016
492113
  checking: false
@@ -492133,7 +492230,7 @@ import { exec as exec4, execSync as execSync12, spawn as spawn15 } from "node:ch
492133
492230
  import os47 from "node:os";
492134
492231
  import path149 from "node:path";
492135
492232
  import fs137 from "node:fs";
492136
- import { fileURLToPath as fileURLToPath19 } from "node:url";
492233
+ import { fileURLToPath as fileURLToPath18 } from "node:url";
492137
492234
  init_dist4();
492138
492235
  import { promisify as promisify12 } from "node:util";
492139
492236
  import { randomBytes as randomBytes7 } from "node:crypto";
@@ -492250,7 +492347,7 @@ async function start_sandbox(config2, nodeArgs = [], cliConfig, cliArgs = []) {
492250
492347
  );
492251
492348
  }
492252
492349
  const profile = process.env["SEATBELT_PROFILE"] ??= "permissive-open";
492253
- let profileFile = fileURLToPath19(
492350
+ let profileFile = fileURLToPath18(
492254
492351
  new URL(`sandbox-macos-${profile}.sb`, import.meta.url)
492255
492352
  );
492256
492353
  if (!BUILTIN_SEATBELT_PROFILES.includes(profile)) {
@@ -492990,9 +493087,9 @@ __name(validateNonInteractiveAuth, "validateNonInteractiveAuth");
492990
493087
 
492991
493088
  // packages/cli/src/ui/components/StandaloneSessionPicker.tsx
492992
493089
  init_esbuild_shims();
492993
- var import_react181 = __toESM(require_react(), 1);
493090
+ var import_react182 = __toESM(require_react(), 1);
492994
493091
  init_dist4();
492995
- var import_jsx_runtime144 = __toESM(require_jsx_runtime(), 1);
493092
+ var import_jsx_runtime145 = __toESM(require_jsx_runtime(), 1);
492996
493093
  var PREVIEW_CONFIG_STUB = {
492997
493094
  getShouldUseNodePtyShell: /* @__PURE__ */ __name(() => false, "getShouldUseNodePtyShell"),
492998
493095
  getIdeMode: /* @__PURE__ */ __name(() => false, "getIdeMode"),
@@ -493011,15 +493108,15 @@ function StandalonePickerScreen({
493011
493108
  initialSessions
493012
493109
  }) {
493013
493110
  const { exit } = use_app_default();
493014
- const [isExiting, setIsExiting] = (0, import_react181.useState)(false);
493111
+ const [isExiting, setIsExiting] = (0, import_react182.useState)(false);
493015
493112
  const handleExit = /* @__PURE__ */ __name(() => {
493016
493113
  setIsExiting(true);
493017
493114
  exit();
493018
493115
  }, "handleExit");
493019
493116
  if (isExiting) {
493020
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Box_default, {});
493117
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Box_default, {});
493021
493118
  }
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)(
493119
+ 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
493120
  SessionPicker,
493024
493121
  {
493025
493122
  sessionService,
@@ -493060,12 +493157,12 @@ async function showResumeSessionPicker(cwd6 = process.cwd(), initialSessions) {
493060
493157
  return new Promise((resolve38) => {
493061
493158
  let selectedId;
493062
493159
  const { unmount, waitUntilExit } = render_default(
493063
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
493160
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
493064
493161
  KeypressProvider,
493065
493162
  {
493066
493163
  kittyProtocolEnabled: false,
493067
493164
  pasteWorkaround: process.platform === "win32" || parseInt(process.versions.node.split(".")[0], 10) < 20,
493068
- children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
493165
+ children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
493069
493166
  StandalonePickerScreen,
493070
493167
  {
493071
493168
  sessionService,
@@ -496116,7 +496213,7 @@ var QwenAgent = class {
496116
496213
  async initialize(args2) {
496117
496214
  this.clientCapabilities = args2.clientCapabilities;
496118
496215
  const authMethods = buildAuthMethods();
496119
- const version2 = "0.40.0";
496216
+ const version2 = "0.45.0";
496120
496217
  return {
496121
496218
  protocolVersion: PROTOCOL_VERSION,
496122
496219
  agentInfo: {
@@ -496769,7 +496866,7 @@ function installSynchronizedOutput(stdout3 = process.stdout, env5 = process.env)
496769
496866
  __name(installSynchronizedOutput, "installSynchronizedOutput");
496770
496867
 
496771
496868
  // packages/cli/src/gemini.tsx
496772
- var import_jsx_runtime145 = __toESM(require_jsx_runtime(), 1);
496869
+ var import_jsx_runtime146 = __toESM(require_jsx_runtime(), 1);
496773
496870
  var debugLogger167 = createDebugLogger("STARTUP");
496774
496871
  function validateDnsResolutionOrder(order) {
496775
496872
  const defaultValue = "ipv4first";
@@ -496838,14 +496935,14 @@ async function startInteractiveUI(config2, settings2, startupWarnings, workspace
496838
496935
  const AppWrapper = /* @__PURE__ */ __name(() => {
496839
496936
  const kittyProtocolStatus = useKittyKeyboardProtocol();
496840
496937
  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)(
496938
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(SettingsContext.Provider, { value: settings2, children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
496842
496939
  KeypressProvider,
496843
496940
  {
496844
496941
  kittyProtocolEnabled: kittyProtocolStatus.enabled,
496845
496942
  config: config2,
496846
496943
  debugKeystrokeLogging: settings2.merged.general?.debugKeystrokeLogging,
496847
496944
  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)(
496945
+ 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
496946
  AppContainer,
496850
496947
  {
496851
496948
  config: config2,
@@ -496859,7 +496956,7 @@ async function startInteractiveUI(config2, settings2, startupWarnings, workspace
496859
496956
  ) });
496860
496957
  }, "AppWrapper");
496861
496958
  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, {}),
496959
+ 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
496960
  {
496864
496961
  exitOnCtrlC: false,
496865
496962
  patchConsole: false,