@atlasharness/atlascode 0.1.17 → 0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +352 -259
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -130295,7 +130295,7 @@ var init_modelAllowlist = __esm(() => {
130295
130295
  init_aliases();
130296
130296
  init_model();
130297
130297
  init_modelprovider2();
130298
- AUTO_MODE_ROLES = ["premium", "small"];
130298
+ AUTO_MODE_ROLES = ["premium", "fast", "small"];
130299
130299
  });
130300
130300
 
130301
130301
  // src/tui/utils/model/model.ts
@@ -331161,7 +331161,7 @@ async function installPluginFromMarketplace({
331161
331161
  }
331162
331162
  return {
331163
331163
  success: true,
331164
- message: `✓ Installed ${entry.name}${result.depNote}. Run /reload-plugins to activate.`
331164
+ message: `✓ Installed ${entry.name}${result.depNote}.`
331165
331165
  };
331166
331166
  } catch (err) {
331167
331167
  const errorMessage = err instanceof Error ? err.message : String(err);
@@ -399314,6 +399314,139 @@ var init_agents3 = __esm(() => {
399314
399314
  agents_default = agents;
399315
399315
  });
399316
399316
 
399317
+ // src/tui/utils/plugins/refresh.ts
399318
+ async function refreshActivePlugins(setAppState) {
399319
+ logForDebugging3("refreshActivePlugins: clearing all plugin caches");
399320
+ clearAllCaches();
399321
+ clearPluginCacheExclusions();
399322
+ const pluginResult = await loadAllPlugins();
399323
+ const [pluginCommands, agentDefinitions] = await Promise.all([
399324
+ getPluginCommands(),
399325
+ getAgentDefinitionsWithOverrides(getOriginalCwd())
399326
+ ]);
399327
+ const { enabled, disabled, errors } = pluginResult;
399328
+ const [mcpCounts, lspCounts] = await Promise.all([
399329
+ Promise.all(enabled.map(async (p) => {
399330
+ if (p.mcpServers)
399331
+ return Object.keys(p.mcpServers).length;
399332
+ const servers = await loadPluginMcpServers(p, errors);
399333
+ if (servers)
399334
+ p.mcpServers = servers;
399335
+ return servers ? Object.keys(servers).length : 0;
399336
+ })),
399337
+ Promise.all(enabled.map(async (p) => {
399338
+ if (p.lspServers)
399339
+ return Object.keys(p.lspServers).length;
399340
+ const servers = await loadPluginLspServers(p, errors);
399341
+ if (servers)
399342
+ p.lspServers = servers;
399343
+ return servers ? Object.keys(servers).length : 0;
399344
+ }))
399345
+ ]);
399346
+ const mcp_count = mcpCounts.reduce((sum, n) => sum + n, 0);
399347
+ const lsp_count = lspCounts.reduce((sum, n) => sum + n, 0);
399348
+ setAppState((prev) => ({
399349
+ ...prev,
399350
+ plugins: {
399351
+ ...prev.plugins,
399352
+ enabled,
399353
+ disabled,
399354
+ commands: pluginCommands,
399355
+ errors: mergePluginErrors(prev.plugins.errors, errors),
399356
+ needsRefresh: false
399357
+ },
399358
+ agentDefinitions,
399359
+ mcp: {
399360
+ ...prev.mcp,
399361
+ pluginReconnectKey: prev.mcp.pluginReconnectKey + 1
399362
+ }
399363
+ }));
399364
+ reinitializeLspServerManager2();
399365
+ let hook_load_failed = false;
399366
+ try {
399367
+ await loadPluginHooks();
399368
+ } catch (e) {
399369
+ hook_load_failed = true;
399370
+ logError3(e);
399371
+ logForDebugging3(`refreshActivePlugins: loadPluginHooks failed: ${errorMessage2(e)}`);
399372
+ }
399373
+ const hook_count = enabled.reduce((sum, p) => {
399374
+ if (!p.hooksConfig)
399375
+ return sum;
399376
+ return sum + Object.values(p.hooksConfig).reduce((s, matchers) => s + (matchers?.reduce((h, m) => h + m.hooks.length, 0) ?? 0), 0);
399377
+ }, 0);
399378
+ logForDebugging3(`refreshActivePlugins: ${enabled.length} enabled, ${pluginCommands.length} commands, ${agentDefinitions.allAgents.length} agents, ${hook_count} hooks, ${mcp_count} MCP, ${lsp_count} LSP`);
399379
+ return {
399380
+ enabled_count: enabled.length,
399381
+ disabled_count: disabled.length,
399382
+ command_count: pluginCommands.length,
399383
+ agent_count: agentDefinitions.allAgents.length,
399384
+ hook_count,
399385
+ mcp_count,
399386
+ lsp_count,
399387
+ error_count: errors.length + (hook_load_failed ? 1 : 0),
399388
+ agentDefinitions,
399389
+ pluginCommands
399390
+ };
399391
+ }
399392
+ async function refreshActivePluginsLightweight(setAppState) {
399393
+ logForDebugging3("refreshActivePluginsLightweight: clearing all plugin caches");
399394
+ clearAllCaches();
399395
+ clearPluginCacheExclusions();
399396
+ const pluginResult = await loadAllPlugins();
399397
+ const [pluginCommands, agentDefinitions] = await Promise.all([
399398
+ getPluginCommands(),
399399
+ getAgentDefinitionsWithOverrides(getOriginalCwd())
399400
+ ]);
399401
+ const { enabled, disabled, errors } = pluginResult;
399402
+ setAppState((prev) => ({
399403
+ ...prev,
399404
+ plugins: {
399405
+ ...prev.plugins,
399406
+ enabled,
399407
+ disabled,
399408
+ commands: pluginCommands,
399409
+ errors: mergePluginErrors(prev.plugins.errors, errors),
399410
+ needsRefresh: false
399411
+ },
399412
+ agentDefinitions
399413
+ }));
399414
+ logForDebugging3(`refreshActivePluginsLightweight: ${enabled.length} enabled, ${pluginCommands.length} commands, ${agentDefinitions.allAgents.length} agents`);
399415
+ return {
399416
+ enabled_count: enabled.length,
399417
+ disabled_count: disabled.length,
399418
+ command_count: pluginCommands.length,
399419
+ agent_count: agentDefinitions.allAgents.length,
399420
+ error_count: errors.length,
399421
+ agentDefinitions,
399422
+ pluginCommands
399423
+ };
399424
+ }
399425
+ function mergePluginErrors(existing, fresh) {
399426
+ const preserved = existing.filter((e) => e.source === "lsp-manager" || e.source.startsWith("plugin:"));
399427
+ const freshKeys = new Set(fresh.map(errorKey));
399428
+ const deduped = preserved.filter((e) => !freshKeys.has(errorKey(e)));
399429
+ return [...deduped, ...fresh];
399430
+ }
399431
+ function errorKey(e) {
399432
+ return e.type === "generic-error" ? `generic-error:${e.source}:${e.error}` : `${e.type}:${e.source}`;
399433
+ }
399434
+ var init_refresh = __esm(() => {
399435
+ init_bootstrap();
399436
+ init_manager();
399437
+ init_loadAgentsDir2();
399438
+ init_debug();
399439
+ init_errors4();
399440
+ init_log5();
399441
+ init_cacheUtils();
399442
+ init_loadPluginCommands();
399443
+ init_loadPluginHooks();
399444
+ init_lspPluginIntegration();
399445
+ init_mcpPluginIntegration();
399446
+ init_orphanedPluginFilter();
399447
+ init_pluginLoader();
399448
+ });
399449
+
399317
399450
  // src/tui/utils/plugins/parseMarketplaceInput.ts
399318
399451
  import { homedir as homedir37 } from "os";
399319
399452
  import { resolve as resolve48 } from "path";
@@ -400832,12 +400965,12 @@ function BrowseMarketplace({
400832
400965
  setSelectedForInstall(new Set);
400833
400966
  clearAllCaches();
400834
400967
  if (failureCount === 0) {
400835
- const message = `✓ Installed ${successCount_0} ${plural2(successCount_0, "plugin")}. ` + `Run /reload-plugins to activate.`;
400968
+ const message = `✓ Installed ${successCount_0} ${plural2(successCount_0, "plugin")}.`;
400836
400969
  setResult(message);
400837
400970
  } else if (successCount_0 === 0) {
400838
400971
  setError(`Failed to install: ${formatFailureDetails(newFailedPlugins, true)}`);
400839
400972
  } else {
400840
- const message_0 = `✓ Installed ${successCount_0} of ${successCount_0 + failureCount} plugins. ` + `Failed: ${formatFailureDetails(newFailedPlugins, false)}. ` + `Run /reload-plugins to activate successfully installed plugins.`;
400973
+ const message_0 = `✓ Installed ${successCount_0} of ${successCount_0 + failureCount} plugins. ` + `Failed: ${formatFailureDetails(newFailedPlugins, false)}.`;
400841
400974
  setResult(message_0);
400842
400975
  }
400843
400976
  if (successCount_0 > 0) {
@@ -401031,10 +401164,10 @@ function BrowseMarketplace({
401031
401164
  onDone: (outcome, detail) => {
401032
401165
  switch (outcome) {
401033
401166
  case "configured":
401034
- finish(`✓ Installed and configured ${plugin_5.name}. Run /reload-plugins to apply.`);
401167
+ finish(`✓ Installed and configured ${plugin_5.name}.`);
401035
401168
  break;
401036
401169
  case "skipped":
401037
- finish(`✓ Installed ${plugin_5.name}. Run /reload-plugins to apply.`);
401170
+ finish(`✓ Installed ${plugin_5.name}.`);
401038
401171
  break;
401039
401172
  case "error":
401040
401173
  finish(`Installed but failed to save config: ${detail}`);
@@ -401704,12 +401837,12 @@ function DiscoverPlugins({
401704
401837
  setSelectedForInstall(new Set);
401705
401838
  clearAllCaches();
401706
401839
  if (failureCount === 0) {
401707
- const message = `✓ Installed ${successCount_0} ${plural2(successCount_0, "plugin")}. ` + `Run /reload-plugins to activate.`;
401840
+ const message = `✓ Installed ${successCount_0} ${plural2(successCount_0, "plugin")}.`;
401708
401841
  setResult(message);
401709
401842
  } else if (successCount_0 === 0) {
401710
401843
  setError(`Failed to install: ${formatFailureDetails(newFailedPlugins, true)}`);
401711
401844
  } else {
401712
- const message_0 = `✓ Installed ${successCount_0} of ${successCount_0 + failureCount} plugins. ` + `Failed: ${formatFailureDetails(newFailedPlugins, false)}. ` + `Run /reload-plugins to activate successfully installed plugins.`;
401845
+ const message_0 = `✓ Installed ${successCount_0} of ${successCount_0 + failureCount} plugins. ` + `Failed: ${formatFailureDetails(newFailedPlugins, false)}.`;
401713
401846
  setResult(message_0);
401714
401847
  }
401715
401848
  if (successCount_0 > 0) {
@@ -401916,10 +402049,10 @@ function DiscoverPlugins({
401916
402049
  onDone: (outcome, detail) => {
401917
402050
  switch (outcome) {
401918
402051
  case "configured":
401919
- finish(`✓ Installed and configured ${plugin_4.name}. Run /reload-plugins to apply.`);
402052
+ finish(`✓ Installed and configured ${plugin_4.name}.`);
401920
402053
  break;
401921
402054
  case "skipped":
401922
- finish(`✓ Installed ${plugin_4.name}. Run /reload-plugins to apply.`);
402055
+ finish(`✓ Installed ${plugin_4.name}.`);
401923
402056
  break;
401924
402057
  case "error":
401925
402058
  finish(`Installed but failed to save config: ${detail}`);
@@ -405321,7 +405454,7 @@ function ManagePlugins({
405321
405454
  } else if (typeof viewState === "object" && (viewState.type === "plugin-options" || viewState.type === "configuring-options")) {
405322
405455
  setViewState("plugin-list");
405323
405456
  setSelectedPlugin(null);
405324
- setResult("Plugin enabled. Configuration skipped — run /reload-plugins to apply.");
405457
+ setResult("Plugin enabled. Configuration skipped.");
405325
405458
  if (onManageComplete) {
405326
405459
  onManageComplete();
405327
405460
  }
@@ -405831,7 +405964,7 @@ function ManagePlugins({
405831
405964
  }
405832
405965
  const operationName = operation === "enable" ? "Enabled" : operation === "disable" ? "Disabled" : operation === "update" ? "Updated" : "Uninstalled";
405833
405966
  const depWarn = reverseDependents && reverseDependents.length > 0 ? ` · required by ${reverseDependents.join(", ")}` : "";
405834
- const message = `✓ ${operationName} ${selectedPlugin.plugin.name}${depWarn}. Run /reload-plugins to apply.`;
405967
+ const message = `✓ ${operationName} ${selectedPlugin.plugin.name}${depWarn}.`;
405835
405968
  setResult(message);
405836
405969
  if (onManageComplete) {
405837
405970
  await onManageComplete();
@@ -406190,7 +406323,7 @@ function ManagePlugins({
406190
406323
  return;
406191
406324
  }
406192
406325
  clearAllCaches();
406193
- setResult(`✓ Disabled ${selectedPlugin.plugin.name} in .atlas/settings.local.json. Run /reload-plugins to apply.`);
406326
+ setResult(`✓ Disabled ${selectedPlugin.plugin.name} in .atlas/settings.local.json.`);
406194
406327
  if (onManageComplete)
406195
406328
  onManageComplete();
406196
406329
  setParentViewState({
@@ -406309,10 +406442,10 @@ function ManagePlugins({
406309
406442
  onDone: (outcome, detail) => {
406310
406443
  switch (outcome) {
406311
406444
  case "configured":
406312
- finish(`✓ Enabled and configured ${selectedPlugin.plugin.name}. Run /reload-plugins to apply.`);
406445
+ finish(`✓ Enabled and configured ${selectedPlugin.plugin.name}.`);
406313
406446
  break;
406314
406447
  case "skipped":
406315
- finish(`✓ Enabled ${selectedPlugin.plugin.name}. Run /reload-plugins to apply.`);
406448
+ finish(`✓ Enabled ${selectedPlugin.plugin.name}.`);
406316
406449
  break;
406317
406450
  case "error":
406318
406451
  finish(`Failed to save configuration: ${detail}`);
@@ -408885,7 +409018,7 @@ function PluginSettings(t0) {
408885
409018
  let t3;
408886
409019
  if ($[5] !== setAppState) {
408887
409020
  t3 = () => {
408888
- setAppState(_temp134);
409021
+ refreshActivePluginsLightweight(setAppState);
408889
409022
  };
408890
409023
  $[5] = setAppState;
408891
409024
  $[6] = t3;
@@ -409397,15 +409530,6 @@ function PluginSettings(t0) {
409397
409530
  }
409398
409531
  return t27;
409399
409532
  }
409400
- function _temp134(prev) {
409401
- return prev.plugins.needsRefresh ? prev : {
409402
- ...prev,
409403
- plugins: {
409404
- ...prev.plugins,
409405
- needsRefresh: true
409406
- }
409407
- };
409408
- }
409409
409533
  function _temp05(s) {
409410
409534
  let count = s.plugins.errors.length;
409411
409535
  for (const m of s.plugins.installationStatus.marketplaces) {
@@ -409430,6 +409554,7 @@ var init_PluginSettings = __esm(() => {
409430
409554
  init_marketplaceHelpers();
409431
409555
  init_marketplaceManager();
409432
409556
  init_pluginStartupCheck();
409557
+ init_refresh();
409433
409558
  init_settings3();
409434
409559
  init_AddMarketplace();
409435
409560
  init_MarketplaceAdopt();
@@ -409478,106 +409603,6 @@ var init_plugin3 = __esm(() => {
409478
409603
  plugin_default = plugin;
409479
409604
  });
409480
409605
 
409481
- // src/tui/utils/plugins/refresh.ts
409482
- async function refreshActivePlugins(setAppState) {
409483
- logForDebugging3("refreshActivePlugins: clearing all plugin caches");
409484
- clearAllCaches();
409485
- clearPluginCacheExclusions();
409486
- const pluginResult = await loadAllPlugins();
409487
- const [pluginCommands, agentDefinitions] = await Promise.all([
409488
- getPluginCommands(),
409489
- getAgentDefinitionsWithOverrides(getOriginalCwd())
409490
- ]);
409491
- const { enabled, disabled, errors } = pluginResult;
409492
- const [mcpCounts, lspCounts] = await Promise.all([
409493
- Promise.all(enabled.map(async (p) => {
409494
- if (p.mcpServers)
409495
- return Object.keys(p.mcpServers).length;
409496
- const servers = await loadPluginMcpServers(p, errors);
409497
- if (servers)
409498
- p.mcpServers = servers;
409499
- return servers ? Object.keys(servers).length : 0;
409500
- })),
409501
- Promise.all(enabled.map(async (p) => {
409502
- if (p.lspServers)
409503
- return Object.keys(p.lspServers).length;
409504
- const servers = await loadPluginLspServers(p, errors);
409505
- if (servers)
409506
- p.lspServers = servers;
409507
- return servers ? Object.keys(servers).length : 0;
409508
- }))
409509
- ]);
409510
- const mcp_count = mcpCounts.reduce((sum, n) => sum + n, 0);
409511
- const lsp_count = lspCounts.reduce((sum, n) => sum + n, 0);
409512
- setAppState((prev) => ({
409513
- ...prev,
409514
- plugins: {
409515
- ...prev.plugins,
409516
- enabled,
409517
- disabled,
409518
- commands: pluginCommands,
409519
- errors: mergePluginErrors(prev.plugins.errors, errors),
409520
- needsRefresh: false
409521
- },
409522
- agentDefinitions,
409523
- mcp: {
409524
- ...prev.mcp,
409525
- pluginReconnectKey: prev.mcp.pluginReconnectKey + 1
409526
- }
409527
- }));
409528
- reinitializeLspServerManager2();
409529
- let hook_load_failed = false;
409530
- try {
409531
- await loadPluginHooks();
409532
- } catch (e) {
409533
- hook_load_failed = true;
409534
- logError3(e);
409535
- logForDebugging3(`refreshActivePlugins: loadPluginHooks failed: ${errorMessage2(e)}`);
409536
- }
409537
- const hook_count = enabled.reduce((sum, p) => {
409538
- if (!p.hooksConfig)
409539
- return sum;
409540
- return sum + Object.values(p.hooksConfig).reduce((s, matchers) => s + (matchers?.reduce((h, m) => h + m.hooks.length, 0) ?? 0), 0);
409541
- }, 0);
409542
- logForDebugging3(`refreshActivePlugins: ${enabled.length} enabled, ${pluginCommands.length} commands, ${agentDefinitions.allAgents.length} agents, ${hook_count} hooks, ${mcp_count} MCP, ${lsp_count} LSP`);
409543
- return {
409544
- enabled_count: enabled.length,
409545
- disabled_count: disabled.length,
409546
- command_count: pluginCommands.length,
409547
- agent_count: agentDefinitions.allAgents.length,
409548
- hook_count,
409549
- mcp_count,
409550
- lsp_count,
409551
- error_count: errors.length + (hook_load_failed ? 1 : 0),
409552
- agentDefinitions,
409553
- pluginCommands
409554
- };
409555
- }
409556
- function mergePluginErrors(existing, fresh) {
409557
- const preserved = existing.filter((e) => e.source === "lsp-manager" || e.source.startsWith("plugin:"));
409558
- const freshKeys = new Set(fresh.map(errorKey));
409559
- const deduped = preserved.filter((e) => !freshKeys.has(errorKey(e)));
409560
- return [...deduped, ...fresh];
409561
- }
409562
- function errorKey(e) {
409563
- return e.type === "generic-error" ? `generic-error:${e.source}:${e.error}` : `${e.type}:${e.source}`;
409564
- }
409565
- var init_refresh = __esm(() => {
409566
- init_bootstrap();
409567
- init_manager();
409568
- init_loadAgentsDir2();
409569
- init_debug();
409570
- init_errors4();
409571
- init_log5();
409572
- init_cacheUtils();
409573
- init_loadPluginCommands();
409574
- init_loadPluginHooks();
409575
- init_lspPluginIntegration();
409576
- init_mcpPluginIntegration();
409577
- init_orphanedPluginFilter();
409578
- init_pluginLoader();
409579
- });
409580
-
409581
409606
  // src/tui/commands/reload-plugins/reload-plugins.ts
409582
409607
  var exports_reload_plugins = {};
409583
409608
  __export(exports_reload_plugins, {
@@ -409874,7 +409899,7 @@ function SandboxConfigTab() {
409874
409899
  t0 = depCheck.warnings.length > 0 ? /* @__PURE__ */ jsx_dev_runtime296.jsxDEV(ThemedBox_default, {
409875
409900
  marginTop: 1,
409876
409901
  flexDirection: "column",
409877
- children: depCheck.warnings.map(_temp135)
409902
+ children: depCheck.warnings.map(_temp134)
409878
409903
  }, undefined, false, undefined, this) : null;
409879
409904
  $[0] = t0;
409880
409905
  } else {
@@ -410050,7 +410075,7 @@ function SandboxConfigTab() {
410050
410075
  }
410051
410076
  return t1;
410052
410077
  }
410053
- function _temp135(w, i) {
410078
+ function _temp134(w, i) {
410054
410079
  return /* @__PURE__ */ jsx_dev_runtime296.jsxDEV(ThemedText, {
410055
410080
  dimColor: true,
410056
410081
  children: w
@@ -410081,7 +410106,7 @@ function SandboxDependenciesTab(t0) {
410081
410106
  const isMac = platform === "macos";
410082
410107
  let t2;
410083
410108
  if ($[1] !== depCheck.errors) {
410084
- t2 = depCheck.errors.some(_temp136);
410109
+ t2 = depCheck.errors.some(_temp135);
410085
410110
  $[1] = depCheck.errors;
410086
410111
  $[2] = t2;
410087
410112
  } else {
@@ -410295,7 +410320,7 @@ function _temp341(e_1) {
410295
410320
  function _temp262(e_0) {
410296
410321
  return e_0.includes("bwrap");
410297
410322
  }
410298
- function _temp136(e) {
410323
+ function _temp135(e) {
410299
410324
  return e.includes("ripgrep");
410300
410325
  }
410301
410326
  var import_compiler_runtime236, jsx_dev_runtime297;
@@ -412024,11 +412049,8 @@ var init_export2 = __esm(() => {
412024
412049
 
412025
412050
  // src/tui/utils/immediateCommand.ts
412026
412051
  function shouldInferenceConfigCommandBeImmediate() {
412027
- return getFeatureValue_CACHED_MAY_BE_STALE("atlas_immediate_model_command", false);
412052
+ return true;
412028
412053
  }
412029
- var init_immediateCommand = __esm(() => {
412030
- init_growthbook();
412031
- });
412032
412054
 
412033
412055
  // src/tui/commands/model/model.tsx
412034
412056
  var exports_model = {};
@@ -412040,7 +412062,7 @@ function ModelPickerWrapper(t0) {
412040
412062
  const {
412041
412063
  onDone
412042
412064
  } = t0;
412043
- const mainLoopModel = useAppState(_temp137);
412065
+ const mainLoopModel = useAppState(_temp136);
412044
412066
  const mainLoopModelForSession = useAppState(_temp263);
412045
412067
  const setAppState = useSetAppState();
412046
412068
  let t1;
@@ -412116,7 +412138,7 @@ function ModelPickerWrapper(t0) {
412116
412138
  function _temp263(s_0) {
412117
412139
  return s_0.mainLoopModelForSession;
412118
412140
  }
412119
- function _temp137(s) {
412141
+ function _temp136(s) {
412120
412142
  return s.mainLoopModel;
412121
412143
  }
412122
412144
  function SetModelAndClose({
@@ -412250,7 +412272,6 @@ var init_model2 = __esm(() => {
412250
412272
  // src/tui/commands/model/index.ts
412251
412273
  var model_default;
412252
412274
  var init_model3 = __esm(() => {
412253
- init_immediateCommand();
412254
412275
  init_model();
412255
412276
  model_default = {
412256
412277
  type: "local-jsx",
@@ -412708,7 +412729,7 @@ function ShowCurrentEffort(t0) {
412708
412729
  const {
412709
412730
  onDone
412710
412731
  } = t0;
412711
- const effortValue = useAppState(_temp138);
412732
+ const effortValue = useAppState(_temp137);
412712
412733
  const model = useMainLoopModel();
412713
412734
  const {
412714
412735
  message
@@ -412716,7 +412737,7 @@ function ShowCurrentEffort(t0) {
412716
412737
  onDone(message);
412717
412738
  return null;
412718
412739
  }
412719
- function _temp138(s) {
412740
+ function _temp137(s) {
412720
412741
  return s.effortValue;
412721
412742
  }
412722
412743
  function ApplyEffortAndClose(t0) {
@@ -412797,7 +412818,6 @@ var init_effort3 = __esm(() => {
412797
412818
  // src/tui/commands/effort/index.ts
412798
412819
  var effort_default;
412799
412820
  var init_effort4 = __esm(() => {
412800
- init_immediateCommand();
412801
412821
  effort_default = {
412802
412822
  type: "local-jsx",
412803
412823
  name: "effort",
@@ -414470,7 +414490,7 @@ function StatsContent(t0) {
414470
414490
  });
414471
414491
  }
414472
414492
  if (key.tab) {
414473
- setActiveTab(_temp139);
414493
+ setActiveTab(_temp138);
414474
414494
  }
414475
414495
  if (input === "r" && !key.ctrl && !key.meta) {
414476
414496
  setDateRange(getNextDateRange(dateRange));
@@ -414635,7 +414655,7 @@ function StatsContent(t0) {
414635
414655
  }
414636
414656
  return t12;
414637
414657
  }
414638
- function _temp139(prev_0) {
414658
+ function _temp138(prev_0) {
414639
414659
  return prev_0 === "Overview" ? "Models" : "Overview";
414640
414660
  }
414641
414661
  function DateRangeSelector(t0) {
@@ -415253,7 +415273,7 @@ function ModelsTab(t0) {
415253
415273
  children: chartOutput.xAxisLabels
415254
415274
  }, undefined, false, undefined, this),
415255
415275
  /* @__PURE__ */ jsx_dev_runtime310.jsxDEV(ThemedBox_default, {
415256
- children: chartOutput.legend.map(_temp140)
415276
+ children: chartOutput.legend.map(_temp139)
415257
415277
  }, undefined, false, undefined, this)
415258
415278
  ]
415259
415279
  }, undefined, true, undefined, this),
@@ -415281,7 +415301,7 @@ function ModelsTab(t0) {
415281
415301
  ]
415282
415302
  }, undefined, true, undefined, this);
415283
415303
  }
415284
- function _temp140(item, i) {
415304
+ function _temp139(item, i) {
415285
415305
  return /* @__PURE__ */ jsx_dev_runtime310.jsxDEV(ThemedText, {
415286
415306
  children: [
415287
415307
  i > 0 ? " · " : "",
@@ -432059,7 +432079,7 @@ function useKeybindingWarnings(warnings, isReload) {
432059
432079
  removeNotification("keybinding-config-warning");
432060
432080
  return;
432061
432081
  }
432062
- const errorCount = count7(warnings, _temp141);
432082
+ const errorCount = count7(warnings, _temp140);
432063
432083
  const warnCount = count7(warnings, _temp264);
432064
432084
  let message;
432065
432085
  if (errorCount > 0 && warnCount > 0) {
@@ -432103,7 +432123,7 @@ function useKeybindingWarnings(warnings, isReload) {
432103
432123
  function _temp264(w_0) {
432104
432124
  return w_0.severity === "warning";
432105
432125
  }
432106
- function _temp141(w) {
432126
+ function _temp140(w) {
432107
432127
  return w.severity === "error";
432108
432128
  }
432109
432129
  function KeybindingSetup({
@@ -434951,7 +434971,7 @@ function PreviewBoxBody(t0) {
434951
434971
  const effectiveMinHeight = Math.min(minHeight ?? 0, effectiveMaxLines);
434952
434972
  const paddingNeeded = Math.max(0, effectiveMinHeight - truncatedLines.length - (isTruncated ? 1 : 0));
434953
434973
  const lines = paddingNeeded > 0 ? [...truncatedLines, ...Array(paddingNeeded).fill("")] : truncatedLines;
434954
- const contentWidth = Math.max(minWidth, ...lines.map(_temp143));
434974
+ const contentWidth = Math.max(minWidth, ...lines.map(_temp141));
434955
434975
  const boxWidth = Math.min(contentWidth + 4, effectiveMaxWidth);
434956
434976
  const innerWidth = boxWidth - 4;
434957
434977
  let t6;
@@ -435091,7 +435111,7 @@ function PreviewBoxBody(t0) {
435091
435111
  }
435092
435112
  return t8;
435093
435113
  }
435094
- function _temp143(line) {
435114
+ function _temp141(line) {
435095
435115
  return stringWidth2(line);
435096
435116
  }
435097
435117
  var import_compiler_runtime254, import_react179, jsx_dev_runtime322, BOX_CHARS;
@@ -435161,7 +435181,7 @@ function QuestionNavigationBar(t0) {
435161
435181
  t2 = t3;
435162
435182
  break bb0;
435163
435183
  }
435164
- const tabHeaders = questions.map(_temp144);
435184
+ const tabHeaders = questions.map(_temp143);
435165
435185
  const idealWidths = tabHeaders.map(_temp265);
435166
435186
  const totalIdealWidth = idealWidths.reduce(_temp342, 0);
435167
435187
  if (totalIdealWidth <= availableForTabs) {
@@ -435337,7 +435357,7 @@ function _temp342(sum, w) {
435337
435357
  function _temp265(header_0) {
435338
435358
  return 4 + stringWidth2(header_0);
435339
435359
  }
435340
- function _temp144(q_0, index_0) {
435360
+ function _temp143(q_0, index_0) {
435341
435361
  return q_0?.header || `Q${index_0 + 1}`;
435342
435362
  }
435343
435363
  var import_compiler_runtime255, jsx_dev_runtime323;
@@ -435768,7 +435788,7 @@ function QuestionView(t0) {
435768
435788
  onRemoveImage
435769
435789
  } = t0;
435770
435790
  const hideSubmitTab = t1 === undefined ? false : t1;
435771
- const isInPlanMode = useAppState(_temp145) === "plan";
435791
+ const isInPlanMode = useAppState(_temp144) === "plan";
435772
435792
  const [isFooterFocused, setIsFooterFocused] = import_react181.useState(false);
435773
435793
  const [footerIndex, setFooterIndex] = import_react181.useState(0);
435774
435794
  const [isOtherFocused, setIsOtherFocused] = import_react181.useState(false);
@@ -436336,7 +436356,7 @@ function _temp266(opt) {
436336
436356
  description: opt.description
436337
436357
  };
436338
436358
  }
436339
- function _temp145(s) {
436359
+ function _temp144(s) {
436340
436360
  return s.toolPermissionContext.mode;
436341
436361
  }
436342
436362
  var import_compiler_runtime256, import_react181, jsx_dev_runtime325;
@@ -436414,7 +436434,7 @@ function PermissionRuleExplanation(t0) {
436414
436434
  permissionResult,
436415
436435
  toolType
436416
436436
  } = t0;
436417
- const permissionMode = useAppState(_temp146);
436437
+ const permissionMode = useAppState(_temp145);
436418
436438
  const t1 = permissionResult?.decisionReason;
436419
436439
  let t2;
436420
436440
  if ($[0] !== t1 || $[1] !== toolType) {
@@ -436475,7 +436495,7 @@ function PermissionRuleExplanation(t0) {
436475
436495
  }
436476
436496
  return t5;
436477
436497
  }
436478
- function _temp146(s) {
436498
+ function _temp145(s) {
436479
436499
  return s.toolPermissionContext.mode;
436480
436500
  }
436481
436501
  var import_compiler_runtime257, jsx_dev_runtime326;
@@ -436912,7 +436932,7 @@ function AskUserQuestionPermissionRequestBody(t0) {
436912
436932
  const maxAllowedHeight = Math.max(MIN_CONTENT_HEIGHT, terminalRows - CONTENT_CHROME_OVERHEAD);
436913
436933
  if ($[5] !== highlight || $[6] !== maxAllowedHeight || $[7] !== maxHeight || $[8] !== maxWidth || $[9] !== questions || $[10] !== theme) {
436914
436934
  for (const q of questions) {
436915
- const hasPreview = q.options.some(_temp147);
436935
+ const hasPreview = q.options.some(_temp146);
436916
436936
  if (hasPreview) {
436917
436937
  const maxPreviewContentLines = Math.max(1, maxAllowedHeight - 11);
436918
436938
  let maxPreviewBoxHeight = 0;
@@ -437442,7 +437462,7 @@ function _temp344(c) {
437442
437462
  function _temp267(contents) {
437443
437463
  return Object.values(contents);
437444
437464
  }
437445
- function _temp147(opt) {
437465
+ function _temp146(opt) {
437446
437466
  return opt.preview;
437447
437467
  }
437448
437468
  async function convertImagesToBlocks(images) {
@@ -437484,6 +437504,28 @@ var init_AskUserQuestionPermissionRequest = __esm(() => {
437484
437504
  jsx_dev_runtime328 = __toESM(require_jsx_dev_runtime(), 1);
437485
437505
  });
437486
437506
 
437507
+ // src/tui/utils/permissions/autoModePermissionOption.ts
437508
+ function isAutoModeOptionVisible(context) {
437509
+ return isAutoModeGateEnabled() && context.mode !== "auto";
437510
+ }
437511
+ function applyAutoModePermissionOption(context, setAppState, recheckPermission) {
437512
+ let next;
437513
+ try {
437514
+ next = {
437515
+ ...transitionPermissionMode(context.mode, "auto", context),
437516
+ mode: "auto"
437517
+ };
437518
+ } catch {
437519
+ recheckPermission();
437520
+ return;
437521
+ }
437522
+ setAppState((prev) => ({ ...prev, toolPermissionContext: next }));
437523
+ recheckPermission();
437524
+ }
437525
+ var init_autoModePermissionOption = __esm(() => {
437526
+ init_permissionSetup2();
437527
+ });
437528
+
437487
437529
  // src/tui/tools/BashTool/destructiveCommandWarning.ts
437488
437530
  function getDestructiveCommandWarning2(command) {
437489
437531
  for (const { pattern, warning } of DESTRUCTIVE_PATTERNS) {
@@ -438303,7 +438345,7 @@ function SuggestedRules(t0) {
438303
438345
  t3 = "Suggested rules:";
438304
438346
  t4 = " ";
438305
438347
  T0 = Ansi;
438306
- t1 = rules.map(_temp148).join(", ");
438348
+ t1 = rules.map(_temp147).join(", ");
438307
438349
  }
438308
438350
  $[0] = suggestions;
438309
438351
  $[1] = T0;
@@ -438357,7 +438399,7 @@ function SuggestedRules(t0) {
438357
438399
  }
438358
438400
  return t7;
438359
438401
  }
438360
- function _temp148(rule) {
438402
+ function _temp147(rule) {
438361
438403
  return source_default.bold(permissionRuleValueToString2(rule));
438362
438404
  }
438363
438405
  function extractDirectories(updates) {
@@ -439181,7 +439223,7 @@ function usePermissionExplainerUI(props) {
439181
439223
  setPromise(createExplanationPromise(props));
439182
439224
  }
439183
439225
  }
439184
- setVisible(_temp149);
439226
+ setVisible(_temp148);
439185
439227
  };
439186
439228
  $[1] = promise;
439187
439229
  $[2] = props;
@@ -439216,7 +439258,7 @@ function usePermissionExplainerUI(props) {
439216
439258
  }
439217
439259
  return t3;
439218
439260
  }
439219
- function _temp149(v) {
439261
+ function _temp148(v) {
439220
439262
  return !v;
439221
439263
  }
439222
439264
  function ExplanationResult(t0) {
@@ -440148,6 +440190,16 @@ function getFilePermissionOptions({
440148
440190
  }
440149
440191
  });
440150
440192
  }
440193
+ if (isAutoModeOptionVisible(toolPermissionContext)) {
440194
+ options.push({
440195
+ label: "Auto mode",
440196
+ description: "Switch this session to auto mode; this request is re-checked by the auto gate",
440197
+ value: "auto-mode",
440198
+ option: {
440199
+ type: "accept-auto-mode"
440200
+ }
440201
+ });
440202
+ }
440151
440203
  return options;
440152
440204
  }
440153
440205
  var jsx_dev_runtime334;
@@ -440158,6 +440210,7 @@ var init_permissionOptions = __esm(() => {
440158
440210
  init_shortcutFormat();
440159
440211
  init_path3();
440160
440212
  init_filesystem2();
440213
+ init_autoModePermissionOption();
440161
440214
  jsx_dev_runtime334 = __toESM(require_jsx_dev_runtime(), 1);
440162
440215
  });
440163
440216
 
@@ -440229,15 +440282,20 @@ function handleReject(params, options) {
440229
440282
  onReject();
440230
440283
  toolUseConfirm.onReject(options?.feedback);
440231
440284
  }
440285
+ function handleAcceptAutoMode(params, _options) {
440286
+ applyAutoModePermissionOption(params.toolPermissionContext, params.setAppState, () => params.toolUseConfirm.recheckPermission());
440287
+ }
440232
440288
  var PERMISSION_HANDLERS;
440233
440289
  var init_usePermissionHandler = __esm(() => {
440290
+ init_autoModePermissionOption();
440234
440291
  init_constants8();
440235
440292
  init_env2();
440236
440293
  init_filesystem2();
440237
440294
  PERMISSION_HANDLERS = {
440238
440295
  "accept-once": handleAcceptOnce,
440239
440296
  "accept-session": handleAcceptSession,
440240
- reject: handleReject
440297
+ reject: handleReject,
440298
+ "accept-auto-mode": handleAcceptAutoMode
440241
440299
  };
440242
440300
  });
440243
440301
 
@@ -440253,6 +440311,7 @@ function useFilePermissionDialog({
440253
440311
  operationType = "write"
440254
440312
  }) {
440255
440313
  const toolPermissionContext = useAppState((s) => s.toolPermissionContext);
440314
+ const setAppState = useSetAppState();
440256
440315
  const [acceptFeedback, setAcceptFeedback] = import_react188.useState("");
440257
440316
  const [rejectFeedback, setRejectFeedback] = import_react188.useState("");
440258
440317
  const [focusedOption, setFocusedOption] = import_react188.useState("yes");
@@ -440279,7 +440338,8 @@ function useFilePermissionDialog({
440279
440338
  onReject,
440280
440339
  completionType,
440281
440340
  languageName,
440282
- operationType
440341
+ operationType,
440342
+ setAppState
440283
440343
  };
440284
440344
  const originalOnAllow = toolUseConfirm.onAllow;
440285
440345
  toolUseConfirm.onAllow = (_input, permissionUpdates, feedback) => {
@@ -440302,7 +440362,8 @@ function useFilePermissionDialog({
440302
440362
  onReject,
440303
440363
  operationType,
440304
440364
  yesFeedbackModeEntered,
440305
- noFeedbackModeEntered
440365
+ noFeedbackModeEntered,
440366
+ setAppState
440306
440367
  ]);
440307
440368
  const handleCycleMode = import_react188.useCallback(() => {
440308
440369
  const sessionOption = options.find((o) => o.option.type === "accept-session");
@@ -440587,7 +440648,7 @@ function SedEditPermissionRequest(t0) {
440587
440648
  `),
440588
440649
  fileExists: true
440589
440650
  };
440590
- })().catch(_temp150);
440651
+ })().catch(_temp149);
440591
440652
  $[3] = filePath;
440592
440653
  $[4] = t1;
440593
440654
  } else {
@@ -440613,7 +440674,7 @@ function SedEditPermissionRequest(t0) {
440613
440674
  }
440614
440675
  return t2;
440615
440676
  }
440616
- function _temp150(e) {
440677
+ function _temp149(e) {
440617
440678
  if (!isENOENT2(e)) {
440618
440679
  throw e;
440619
440680
  }
@@ -441171,7 +441232,8 @@ function bashToolUseOptions({
441171
441232
  yesInputMode = false,
441172
441233
  noInputMode = false,
441173
441234
  editablePrefix,
441174
- onEditablePrefixChange
441235
+ onEditablePrefixChange,
441236
+ showAutoModeOption = false
441175
441237
  }) {
441176
441238
  const options = [];
441177
441239
  if (yesInputMode) {
@@ -441214,6 +441276,13 @@ function bashToolUseOptions({
441214
441276
  }
441215
441277
  }
441216
441278
  }
441279
+ if (showAutoModeOption) {
441280
+ options.push({
441281
+ label: "Auto mode",
441282
+ description: "Switch this session to auto mode; this request is re-checked by the auto gate",
441283
+ value: "yes-auto-mode"
441284
+ });
441285
+ }
441217
441286
  if (noInputMode) {
441218
441287
  options.push({
441219
441288
  type: "input",
@@ -441371,6 +441440,7 @@ function BashPermissionRequestInner({
441371
441440
  }) {
441372
441441
  const [theme] = useTheme();
441373
441442
  const toolPermissionContext = useAppState((s) => s.toolPermissionContext);
441443
+ const setAppState = useSetAppState();
441374
441444
  const explainerState = usePermissionExplainerUI({
441375
441445
  toolName: toolUseConfirm.tool.name,
441376
441446
  toolInput: toolUseConfirm.input,
@@ -441480,8 +441550,9 @@ function BashPermissionRequestInner({
441480
441550
  yesInputMode,
441481
441551
  noInputMode,
441482
441552
  editablePrefix,
441483
- onEditablePrefixChange
441484
- }), [toolUseConfirm, classifierDescription, initialClassifierDescriptionEmpty, existingAllowDescriptions, yesInputMode, noInputMode, editablePrefix, onEditablePrefixChange]);
441553
+ onEditablePrefixChange,
441554
+ showAutoModeOption: isAutoModeOptionVisible(toolPermissionContext)
441555
+ }), [toolUseConfirm, classifierDescription, initialClassifierDescriptionEmpty, existingAllowDescriptions, yesInputMode, noInputMode, editablePrefix, onEditablePrefixChange, toolPermissionContext]);
441485
441556
  const handleToggleDebug = import_react192.useCallback(() => {
441486
441557
  setShowPermissionDebug((prev) => !prev);
441487
441558
  }, []);
@@ -441536,6 +441607,10 @@ function BashPermissionRequestInner({
441536
441607
  onDone();
441537
441608
  return;
441538
441609
  }
441610
+ if (value_0 === "yes-auto-mode") {
441611
+ applyAutoModePermissionOption(toolPermissionContext, setAppState, () => toolUseConfirm.recheckPermission());
441612
+ return;
441613
+ }
441539
441614
  switch (value_0) {
441540
441615
  case "yes": {
441541
441616
  const trimmedFeedback_0 = acceptFeedback.trim();
@@ -441691,6 +441766,7 @@ var init_BashPermissionRequest = __esm(() => {
441691
441766
  init_useKeybinding();
441692
441767
  init_growthbook();
441693
441768
  init_AppState();
441769
+ init_autoModePermissionOption();
441694
441770
  init_BashTool();
441695
441771
  init_bashPermissions2();
441696
441772
  init_destructiveCommandWarning2();
@@ -441725,7 +441801,7 @@ function EnterPlanModePermissionRequest(t0) {
441725
441801
  onReject,
441726
441802
  workerBadge
441727
441803
  } = t0;
441728
- const toolPermissionContextMode = useAppState(_temp151);
441804
+ const toolPermissionContextMode = useAppState(_temp150);
441729
441805
  let t1;
441730
441806
  if ($[0] !== onDone || $[1] !== onReject || $[2] !== toolPermissionContextMode || $[3] !== toolUseConfirm) {
441731
441807
  t1 = function handleResponse(value) {
@@ -441876,7 +441952,7 @@ function EnterPlanModePermissionRequest(t0) {
441876
441952
  }
441877
441953
  return t9;
441878
441954
  }
441879
- function _temp151(s) {
441955
+ function _temp150(s) {
441880
441956
  return s.toolPermissionContext.mode;
441881
441957
  }
441882
441958
  var import_compiler_runtime267, jsx_dev_runtime339;
@@ -442807,7 +442883,7 @@ function PermissionPrompt(t0) {
442807
442883
  let t7;
442808
442884
  if ($[31] !== onCancel || $[32] !== setAppState) {
442809
442885
  t7 = () => {
442810
- setAppState(_temp153);
442886
+ setAppState(_temp151);
442811
442887
  onCancel?.();
442812
442888
  };
442813
442889
  $[31] = onCancel;
@@ -442904,7 +442980,7 @@ function PermissionPrompt(t0) {
442904
442980
  }
442905
442981
  return t13;
442906
442982
  }
442907
- function _temp153(prev) {
442983
+ function _temp151(prev) {
442908
442984
  return {
442909
442985
  ...prev,
442910
442986
  attribution: {
@@ -443336,7 +443412,7 @@ function createSingleEditDiffConfig(filePath, oldString, newString, replaceAll)
443336
443412
  import { basename as basename57, relative as relative33 } from "path";
443337
443413
  function FileEditPermissionRequest(props) {
443338
443414
  const $ = import_compiler_runtime270.c(51);
443339
- const parseInput = _temp154;
443415
+ const parseInput = _temp153;
443340
443416
  let T0;
443341
443417
  let T1;
443342
443418
  let T2;
@@ -443512,7 +443588,7 @@ function FileEditPermissionRequest(props) {
443512
443588
  }
443513
443589
  return t16;
443514
443590
  }
443515
- function _temp154(input) {
443591
+ function _temp153(input) {
443516
443592
  return FileEditTool.inputSchema.parse(input);
443517
443593
  }
443518
443594
  var import_compiler_runtime270, jsx_dev_runtime343, ideDiffSupport;
@@ -443586,7 +443662,7 @@ function FilesystemPermissionRequest(t0) {
443586
443662
  const isReadOnly = toolUseConfirm.tool.isReadOnly(toolUseConfirm.input);
443587
443663
  const userFacingReadOrEdit = isReadOnly ? "Read" : "Edit";
443588
443664
  const title = `${userFacingReadOrEdit} file`;
443589
- const parseInput = _temp155;
443665
+ const parseInput = _temp154;
443590
443666
  if (!path) {
443591
443667
  let t3;
443592
443668
  if ($[5] !== onDone || $[6] !== onReject || $[7] !== toolUseConfirm || $[8] !== toolUseContext || $[9] !== verbose || $[10] !== workerBadge) {
@@ -443677,7 +443753,7 @@ function FilesystemPermissionRequest(t0) {
443677
443753
  }
443678
443754
  return t6;
443679
443755
  }
443680
- function _temp155(input) {
443756
+ function _temp154(input) {
443681
443757
  return input;
443682
443758
  }
443683
443759
  var import_compiler_runtime271, jsx_dev_runtime344;
@@ -443747,7 +443823,7 @@ function FileWriteToolDiff(t0) {
443747
443823
  firstLine,
443748
443824
  fileContent: oldContent,
443749
443825
  width: columns - 2
443750
- }, _.newStart, false, undefined, this)), _temp156) : /* @__PURE__ */ jsx_dev_runtime345.jsxDEV(HighlightedCode, {
443826
+ }, _.newStart, false, undefined, this)), _temp155) : /* @__PURE__ */ jsx_dev_runtime345.jsxDEV(HighlightedCode, {
443751
443827
  code: content || "(No content)",
443752
443828
  filePath: file_path
443753
443829
  }, undefined, false, undefined, this);
@@ -443782,7 +443858,7 @@ function FileWriteToolDiff(t0) {
443782
443858
  }
443783
443859
  return t4;
443784
443860
  }
443785
- function _temp156(i) {
443861
+ function _temp155(i) {
443786
443862
  return /* @__PURE__ */ jsx_dev_runtime345.jsxDEV(NoSelect, {
443787
443863
  fromLeftEdge: true,
443788
443864
  children: /* @__PURE__ */ jsx_dev_runtime345.jsxDEV(ThemedText, {
@@ -443806,7 +443882,7 @@ var init_FileWriteToolDiff = __esm(() => {
443806
443882
  import { basename as basename58, relative as relative34 } from "path";
443807
443883
  function FileWritePermissionRequest(props) {
443808
443884
  const $ = import_compiler_runtime273.c(30);
443809
- const parseInput = _temp157;
443885
+ const parseInput = _temp156;
443810
443886
  let t0;
443811
443887
  if ($[0] !== props.toolUseConfirm.input) {
443812
443888
  t0 = parseInput(props.toolUseConfirm.input);
@@ -443953,7 +444029,7 @@ function FileWritePermissionRequest(props) {
443953
444029
  }
443954
444030
  return t13;
443955
444031
  }
443956
- function _temp157(input) {
444032
+ function _temp156(input) {
443957
444033
  return FileWriteTool.inputSchema.parse(input);
443958
444034
  }
443959
444035
  var import_compiler_runtime273, jsx_dev_runtime346, ideDiffSupport2;
@@ -444000,7 +444076,7 @@ function NotebookEditToolDiff(props) {
444000
444076
  if ($[0] !== props.notebook_path) {
444001
444077
  t0 = getFsImplementation2().readFile(props.notebook_path, {
444002
444078
  encoding: "utf-8"
444003
- }).then(_temp158).catch(_temp269);
444079
+ }).then(_temp157).catch(_temp269);
444004
444080
  $[0] = props.notebook_path;
444005
444081
  $[1] = t0;
444006
444082
  } else {
@@ -444027,7 +444103,7 @@ function NotebookEditToolDiff(props) {
444027
444103
  function _temp269() {
444028
444104
  return null;
444029
444105
  }
444030
- function _temp158(content) {
444106
+ function _temp157(content) {
444031
444107
  return safeParseJSON3(content);
444032
444108
  }
444033
444109
  function NotebookEditToolDiffInner(t0) {
@@ -444278,7 +444354,7 @@ var init_NotebookEditToolDiff = __esm(() => {
444278
444354
  import { basename as basename59 } from "path";
444279
444355
  function NotebookEditPermissionRequest(props) {
444280
444356
  const $ = import_compiler_runtime275.c(52);
444281
- const parseInput = _temp159;
444357
+ const parseInput = _temp158;
444282
444358
  let T0;
444283
444359
  let T1;
444284
444360
  let T2;
@@ -444450,7 +444526,7 @@ function NotebookEditPermissionRequest(props) {
444450
444526
  }
444451
444527
  return t15;
444452
444528
  }
444453
- function _temp159(input) {
444529
+ function _temp158(input) {
444454
444530
  const result = NotebookEditTool2.inputSchema.safeParse(input);
444455
444531
  if (!result.success) {
444456
444532
  logError3(new Error(`Failed to parse notebook edit input: ${result.error.message}`));
@@ -444688,7 +444764,8 @@ function powershellToolUseOptions({
444688
444764
  yesInputMode = false,
444689
444765
  noInputMode = false,
444690
444766
  editablePrefix,
444691
- onEditablePrefixChange
444767
+ onEditablePrefixChange,
444768
+ showAutoModeOption = false
444692
444769
  }) {
444693
444770
  const options = [];
444694
444771
  if (yesInputMode) {
@@ -444731,6 +444808,13 @@ function powershellToolUseOptions({
444731
444808
  }
444732
444809
  }
444733
444810
  }
444811
+ if (showAutoModeOption) {
444812
+ options.push({
444813
+ label: "Auto mode",
444814
+ description: "Switch this session to auto mode; this request is re-checked by the auto gate",
444815
+ value: "yes-auto-mode"
444816
+ });
444817
+ }
444734
444818
  if (noInputMode) {
444735
444819
  options.push({
444736
444820
  type: "input",
@@ -444767,6 +444851,8 @@ function PowerShellPermissionRequest(props) {
444767
444851
  description
444768
444852
  } = PowerShellTool.inputSchema.parse(toolUseConfirm.input);
444769
444853
  const [theme] = useTheme();
444854
+ const toolPermissionContext = useAppState((s) => s.toolPermissionContext);
444855
+ const setAppState = useSetAppState();
444770
444856
  const explainerState = usePermissionExplainerUI({
444771
444857
  toolName: toolUseConfirm.tool.name,
444772
444858
  toolInput: toolUseConfirm.input,
@@ -444826,8 +444912,9 @@ function PowerShellPermissionRequest(props) {
444826
444912
  yesInputMode,
444827
444913
  noInputMode,
444828
444914
  editablePrefix,
444829
- onEditablePrefixChange
444830
- }), [toolUseConfirm, yesInputMode, noInputMode, editablePrefix, onEditablePrefixChange]);
444915
+ onEditablePrefixChange,
444916
+ showAutoModeOption: isAutoModeOptionVisible(toolPermissionContext)
444917
+ }), [toolUseConfirm, yesInputMode, noInputMode, editablePrefix, onEditablePrefixChange, toolPermissionContext]);
444831
444918
  const handleToggleDebug = import_react196.useCallback(() => {
444832
444919
  setShowPermissionDebug((prev) => !prev);
444833
444920
  }, []);
@@ -444855,6 +444942,10 @@ function PowerShellPermissionRequest(props) {
444855
444942
  onDone();
444856
444943
  return;
444857
444944
  }
444945
+ if (value === "yes-auto-mode") {
444946
+ applyAutoModePermissionOption(toolPermissionContext, setAppState, () => toolUseConfirm.recheckPermission());
444947
+ return;
444948
+ }
444858
444949
  switch (value) {
444859
444950
  case "yes": {
444860
444951
  const trimmedFeedback = acceptFeedback.trim();
@@ -444977,10 +445068,12 @@ var import_react196, jsx_dev_runtime349;
444977
445068
  var init_PowerShellPermissionRequest = __esm(() => {
444978
445069
  init_ink2();
444979
445070
  init_useKeybinding();
445071
+ init_AppState();
444980
445072
  init_growthbook();
444981
445073
  init_destructiveCommandWarning3();
444982
445074
  init_PowerShellTool();
444983
445075
  init_readOnlyValidation2();
445076
+ init_autoModePermissionOption();
444984
445077
  init_staticPrefix();
444985
445078
  init_select();
444986
445079
  init_hooks8();
@@ -445004,7 +445097,7 @@ function SkillPermissionRequest(props) {
445004
445097
  onReject,
445005
445098
  workerBadge
445006
445099
  } = props;
445007
- const parseInput = _temp160;
445100
+ const parseInput = _temp159;
445008
445101
  let t0;
445009
445102
  if ($[0] !== toolUseConfirm.input) {
445010
445103
  t0 = parseInput(toolUseConfirm.input);
@@ -445397,7 +445490,7 @@ function SkillPermissionRequest(props) {
445397
445490
  }
445398
445491
  return t19;
445399
445492
  }
445400
- function _temp160(input) {
445493
+ function _temp159(input) {
445401
445494
  const result = SkillTool2.inputSchema.safeParse(input);
445402
445495
  if (!result.success) {
445403
445496
  logError3(new Error(`Failed to parse skill tool input: ${result.error.message}`));
@@ -447503,7 +447596,7 @@ function PromptDialog(t0) {
447503
447596
  useKeybinding("app:interrupt", onAbort, t1);
447504
447597
  let t2;
447505
447598
  if ($[1] !== request.options) {
447506
- t2 = request.options.map(_temp161);
447599
+ t2 = request.options.map(_temp160);
447507
447600
  $[1] = request.options;
447508
447601
  $[2] = t2;
447509
447602
  } else {
@@ -447565,7 +447658,7 @@ function PromptDialog(t0) {
447565
447658
  }
447566
447659
  return t6;
447567
447660
  }
447568
- function _temp161(opt) {
447661
+ function _temp160(opt) {
447569
447662
  return {
447570
447663
  label: opt.label,
447571
447664
  value: opt.key,
@@ -448865,7 +448958,7 @@ function Notifications(t0) {
448865
448958
  const {
448866
448959
  status: ideStatus
448867
448960
  } = useIdeConnectionStatus(mcpClients);
448868
- const notifications = useAppState(_temp163);
448961
+ const notifications = useAppState(_temp161);
448869
448962
  const {
448870
448963
  addNotification,
448871
448964
  removeNotification
@@ -449012,7 +449105,7 @@ function Notifications(t0) {
449012
449105
  function _temp270() {
449013
449106
  return setEnvHookNotifier2(null);
449014
449107
  }
449015
- function _temp163(s) {
449108
+ function _temp161(s) {
449016
449109
  return s.notifications;
449017
449110
  }
449018
449111
  function NotificationContent({
@@ -453368,7 +453461,7 @@ function AutoModeOptInDialog(t0) {
453368
453461
  } else {
453369
453462
  t1 = $[0];
453370
453463
  }
453371
- import_react215.default.useEffect(_temp164, t1);
453464
+ import_react215.default.useEffect(_temp163, t1);
453372
453465
  let t2;
453373
453466
  if ($[1] !== onAccept || $[2] !== onDecline) {
453374
453467
  t2 = function onChange(value) {
@@ -453501,7 +453594,7 @@ function AutoModeOptInDialog(t0) {
453501
453594
  }
453502
453595
  return t10;
453503
453596
  }
453504
- function _temp164() {}
453597
+ function _temp163() {}
453505
453598
  var import_compiler_runtime288, import_react215, jsx_dev_runtime367, AUTO_MODE_DESCRIPTION = "Auto mode lets Atlas handle permission prompts automatically — Atlas checks each tool call for risky actions and prompt injection before executing. Actions Atlas identifies as safe are executed, while actions Atlas identifies as risky are blocked and Atlas may try a different approach. Ideal for long-running tasks. Sessions are slightly more expensive. Atlas can make mistakes that allow harmful commands to run, it's recommended to only use in isolated environments. Shift+Tab to change mode.";
453506
453599
  var init_AutoModeOptInDialog = __esm(() => {
453507
453600
  init_ink2();
@@ -453519,12 +453612,12 @@ function getVisibleAgentTasks(tasks) {
453519
453612
  return Object.values(tasks).filter((t) => isPanelAgentTask2(t) && t.evictAfter !== 0).sort((a, b) => a.startTime - b.startTime);
453520
453613
  }
453521
453614
  function useCoordinatorTaskCount() {
453522
- const tasks = useAppState(_temp165);
453615
+ const tasks = useAppState(_temp164);
453523
453616
  let t0;
453524
453617
  t0 = 0;
453525
453618
  return t0;
453526
453619
  }
453527
- function _temp165(s) {
453620
+ function _temp164(s) {
453528
453621
  return s.tasks;
453529
453622
  }
453530
453623
  var import_compiler_runtime289, React115;
@@ -453991,7 +454084,7 @@ function GlobalSearchDialog(t0) {
453991
454084
  }
453992
454085
  abortRef.current?.abort();
453993
454086
  if (!q.trim()) {
453994
- setMatches(_temp166);
454087
+ setMatches(_temp165);
453995
454088
  setIsSearching(false);
453996
454089
  setTruncated(false);
453997
454090
  return;
@@ -454217,7 +454310,7 @@ function _temp347(m_2) {
454217
454310
  return m_2.length ? [] : m_2;
454218
454311
  }
454219
454312
  function _temp271() {}
454220
- function _temp166(m) {
454313
+ function _temp165(m) {
454221
454314
  return m.length ? [] : m;
454222
454315
  }
454223
454316
  function matchKey(m) {
@@ -454454,7 +454547,7 @@ function QuickOpenDialog(t0) {
454454
454547
  if (gen !== queryGenRef.current) {
454455
454548
  return;
454456
454549
  }
454457
- const paths = items.filter(_temp167).map(_temp272).filter(_temp348).map(_temp434);
454550
+ const paths = items.filter(_temp166).map(_temp272).filter(_temp348).map(_temp434);
454458
454551
  setResults(paths);
454459
454552
  });
454460
454553
  };
@@ -454643,7 +454736,7 @@ function _temp348(p) {
454643
454736
  function _temp272(i_0) {
454644
454737
  return i_0.displayText;
454645
454738
  }
454646
- function _temp167(i) {
454739
+ function _temp166(i) {
454647
454740
  return i.id.startsWith("file-");
454648
454741
  }
454649
454742
  var import_compiler_runtime292, import_react219, jsx_dev_runtime372, VISIBLE_RESULTS2 = 8, PREVIEW_LINES = 20;
@@ -454809,7 +454902,7 @@ function ThinkingToggle(t0) {
454809
454902
  defaultFocusValue: currentValue ? "true" : "false",
454810
454903
  options,
454811
454904
  onChange: handleSelectChange,
454812
- onCancel: onCancel ?? _temp168,
454905
+ onCancel: onCancel ?? _temp167,
454813
454906
  visibleOptionCount: 2
454814
454907
  }, undefined, false, undefined, this)
454815
454908
  }, undefined, false, undefined, this)
@@ -454886,7 +454979,7 @@ function ThinkingToggle(t0) {
454886
454979
  }
454887
454980
  return t11;
454888
454981
  }
454889
- function _temp168() {}
454982
+ function _temp167() {}
454890
454983
  var import_compiler_runtime293, import_react220, jsx_dev_runtime373;
454891
454984
  var init_ThinkingToggle = __esm(() => {
454892
454985
  init_useExitOnCtrlCDWithKeybindings();
@@ -455335,7 +455428,7 @@ function TeammateDetailView(t0) {
455335
455428
  if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
455336
455429
  t4 = (input) => {
455337
455430
  if (input === "p") {
455338
- setPromptExpanded(_temp169);
455431
+ setPromptExpanded(_temp168);
455339
455432
  }
455340
455433
  };
455341
455434
  $[6] = t4;
@@ -455529,7 +455622,7 @@ function _temp273(task_0) {
455529
455622
  ]
455530
455623
  }, task_0.id, true, undefined, this);
455531
455624
  }
455532
- function _temp169(prev) {
455625
+ function _temp168(prev) {
455533
455626
  return !prev;
455534
455627
  }
455535
455628
  async function killTeammate(paneId, backendType, teamName, teammateId, teammateName, setAppState) {
@@ -456789,7 +456882,7 @@ function VimTextInput(props) {
456789
456882
  const t11 = props.multiline;
456790
456883
  const t12 = props.showCursor ? " " : "";
456791
456884
  const t13 = props.highlightPastedText;
456792
- const t14 = isTerminalFocused ? source_default.inverse : _temp170;
456885
+ const t14 = isTerminalFocused ? source_default.inverse : _temp169;
456793
456886
  let t15;
456794
456887
  if ($[0] !== theme) {
456795
456888
  t15 = color("text", theme);
@@ -456902,7 +456995,7 @@ function VimTextInput(props) {
456902
456995
  }
456903
456996
  return t19;
456904
456997
  }
456905
- function _temp170(text) {
456998
+ function _temp169(text) {
456906
456999
  return text;
456907
457000
  }
456908
457001
  var import_compiler_runtime295, import_react223, jsx_dev_runtime375;
@@ -458183,7 +458276,7 @@ function BackgroundTaskStatus(t0) {
458183
458276
  const {
458184
458277
  columns
458185
458278
  } = useTerminalSize();
458186
- const tasks = useAppState(_temp173);
458279
+ const tasks = useAppState(_temp171);
458187
458280
  const viewingAgentTaskId = useAppState(_temp274);
458188
458281
  let t3;
458189
458282
  if ($[0] !== tasks) {
@@ -458238,7 +458331,7 @@ function BackgroundTaskStatus(t0) {
458238
458331
  const allPills = t6;
458239
458332
  let t7;
458240
458333
  if ($[10] !== allPills) {
458241
- t7 = allPills.map(_temp171);
458334
+ t7 = allPills.map(_temp170);
458242
458335
  $[10] = allPills;
458243
458336
  $[11] = t7;
458244
458337
  } else {
@@ -458436,7 +458529,7 @@ function BackgroundTaskStatus(t0) {
458436
458529
  }
458437
458530
  return t11;
458438
458531
  }
458439
- function _temp171(pill_0, i_0) {
458532
+ function _temp170(pill_0, i_0) {
458440
458533
  const pillText = `@${pill_0.name}`;
458441
458534
  return stringWidth2(pillText) + (i_0 > 0 ? 1 : 0);
458442
458535
  }
@@ -458478,7 +458571,7 @@ function _temp349(t) {
458478
458571
  function _temp274(s_0) {
458479
458572
  return s_0.viewingAgentTaskId;
458480
458573
  }
458481
- function _temp173(s) {
458574
+ function _temp171(s) {
458482
458575
  return s.tasks;
458483
458576
  }
458484
458577
  function AgentPill(t0) {
@@ -458701,7 +458794,7 @@ function TeamStatus(t0) {
458701
458794
  teamsSelected,
458702
458795
  showHint
458703
458796
  } = t0;
458704
- const teamContext = useAppState(_temp174);
458797
+ const teamContext = useAppState(_temp173);
458705
458798
  let t1;
458706
458799
  if ($[0] !== teamContext) {
458707
458800
  t1 = teamContext ? Object.values(teamContext.teammates).filter(_temp275).length : 0;
@@ -458783,7 +458876,7 @@ function TeamStatus(t0) {
458783
458876
  function _temp275(t) {
458784
458877
  return t.name !== "team-lead";
458785
458878
  }
458786
- function _temp174(s) {
458879
+ function _temp173(s) {
458787
458880
  return s.teamContext;
458788
458881
  }
458789
458882
  var import_compiler_runtime297, jsx_dev_runtime395;
@@ -458821,7 +458914,7 @@ function HistorySearchInput(t0) {
458821
458914
  value,
458822
458915
  onChange,
458823
458916
  cursorOffset: value.length,
458824
- onChangeCursorOffset: _temp175,
458917
+ onChangeCursorOffset: _temp174,
458825
458918
  columns: t3,
458826
458919
  focus: true,
458827
458920
  showCursor: true,
@@ -458852,7 +458945,7 @@ function HistorySearchInput(t0) {
458852
458945
  }
458853
458946
  return t5;
458854
458947
  }
458855
- function _temp175() {}
458948
+ function _temp174() {}
458856
458949
  var import_compiler_runtime298, jsx_dev_runtime396, HistorySearchInput_default;
458857
458950
  var init_HistorySearchInput = __esm(() => {
458858
458951
  init_stringWidth();
@@ -465354,7 +465447,7 @@ function useCanUseTool(setToolUseConfirmQueue, setToolPermissionContext) {
465354
465447
  if (feature("BASH_CLASSIFIER") && result.pendingClassifierCheck && tool.name === BASH_TOOL_NAME2 && !appState.toolPermissionContext.awaitAutomatedChecksBeforeDialog) {
465355
465448
  const speculativePromise = peekSpeculativeClassifierCheck2(input.command);
465356
465449
  if (speculativePromise) {
465357
- const raceResult = await Promise.race([speculativePromise.then(_temp176), new Promise(_temp276)]);
465450
+ const raceResult = await Promise.race([speculativePromise.then(_temp175), new Promise(_temp276)]);
465358
465451
  if (ctx.resolveIfAborted(resolve)) {
465359
465452
  return;
465360
465453
  }
@@ -465417,7 +465510,7 @@ function _temp276(res) {
465417
465510
  type: "timeout"
465418
465511
  });
465419
465512
  }
465420
- function _temp176(r) {
465513
+ function _temp175(r) {
465421
465514
  return {
465422
465515
  type: "result",
465423
465516
  result: r
@@ -466202,7 +466295,7 @@ async function handlePromptSubmit(params) {
466202
466295
  const spaceIndex = trimmedInput.indexOf(" ");
466203
466296
  const commandName = spaceIndex === -1 ? trimmedInput.slice(1) : trimmedInput.slice(1, spaceIndex);
466204
466297
  const commandArgs = spaceIndex === -1 ? "" : trimmedInput.slice(spaceIndex + 1).trim();
466205
- const immediateCommand = commands.find((cmd) => cmd.immediate && isCommandEnabled2(cmd) && (cmd.name === commandName || cmd.aliases?.includes(commandName) || getCommandName2(cmd) === commandName));
466298
+ const immediateCommand = commands.find((cmd) => (cmd.immediate ?? true) && isCommandEnabled2(cmd) && (cmd.name === commandName || cmd.aliases?.includes(commandName) || getCommandName2(cmd) === commandName));
466206
466299
  if (immediateCommand && immediateCommand.type === "local-jsx" && (queryGuard.isActive || isExternalLoading)) {
466207
466300
  onInputChange("");
466208
466301
  setCursorOffset(0);
@@ -467038,7 +467131,7 @@ var init_useManagePlugins = __esm(() => {
467038
467131
  // src/tui/components/TeammateViewHeader.tsx
467039
467132
  function TeammateViewHeader() {
467040
467133
  const $ = import_compiler_runtime305.c(14);
467041
- const viewedTeammate = useAppState(_temp177);
467134
+ const viewedTeammate = useAppState(_temp176);
467042
467135
  if (!viewedTeammate) {
467043
467136
  return null;
467044
467137
  }
@@ -467137,7 +467230,7 @@ function TeammateViewHeader() {
467137
467230
  }
467138
467231
  return t6;
467139
467232
  }
467140
- function _temp177(s) {
467233
+ function _temp176(s) {
467141
467234
  return getViewedTeammateTask(s);
467142
467235
  }
467143
467236
  var import_compiler_runtime305, jsx_dev_runtime406;
@@ -468487,7 +468580,7 @@ function SessionBackgroundHint(t0) {
468487
468580
  const setAppState = useSetAppState();
468488
468581
  const appStateStore = useAppStateStore();
468489
468582
  const [showSessionHint, setShowSessionHint] = import_react256.useState(false);
468490
- const handleDoublePress = useDoublePress(setShowSessionHint, onBackgroundSession, _temp178);
468583
+ const handleDoublePress = useDoublePress(setShowSessionHint, onBackgroundSession, _temp177);
468491
468584
  let t1;
468492
468585
  if ($[0] !== appStateStore || $[1] !== handleDoublePress || $[2] !== isLoading || $[3] !== setAppState) {
468493
468586
  t1 = () => {
@@ -468567,7 +468660,7 @@ function _temp277(c) {
468567
468660
  hasUsedBackgroundTask: true
468568
468661
  };
468569
468662
  }
468570
- function _temp178() {}
468663
+ function _temp177() {}
468571
468664
  var import_compiler_runtime307, import_react256, jsx_dev_runtime407;
468572
468665
  var init_SessionBackgroundHint = __esm(() => {
468573
468666
  init_useDoublePress();
@@ -468743,9 +468836,9 @@ function useInstallMessages() {
468743
468836
  }
468744
468837
  async function _temp278() {
468745
468838
  const messages = await checkInstall();
468746
- return messages.map(_temp179);
468839
+ return messages.map(_temp178);
468747
468840
  }
468748
- function _temp179(message, index) {
468841
+ function _temp178(message, index) {
468749
468842
  let priority = "low";
468750
468843
  if (message.type === "error" || message.userActionRequired) {
468751
468844
  priority = "high";
@@ -469134,9 +469227,9 @@ var init_officialMarketplaceStartupCheck = __esm(() => {
469134
469227
 
469135
469228
  // src/tui/hooks/useOfficialMarketplaceNotification.tsx
469136
469229
  function useOfficialMarketplaceNotification() {
469137
- useStartupNotification(_temp180);
469230
+ useStartupNotification(_temp179);
469138
469231
  }
469139
- async function _temp180() {
469232
+ async function _temp179() {
469140
469233
  const result = await checkAndInstallOfficialMarketplace();
469141
469234
  const notifs = [];
469142
469235
  if (result.configSaveFailed) {
@@ -469696,7 +469789,7 @@ function SandboxViolationExpandedView() {
469696
469789
  }
469697
469790
  let t5;
469698
469791
  if ($[6] !== violations) {
469699
- t5 = violations.map(_temp181);
469792
+ t5 = violations.map(_temp180);
469700
469793
  $[6] = violations;
469701
469794
  $[7] = t5;
469702
469795
  } else {
@@ -469743,7 +469836,7 @@ function SandboxViolationExpandedView() {
469743
469836
  }
469744
469837
  return t8;
469745
469838
  }
469746
- function _temp181(v, i) {
469839
+ function _temp180(v, i) {
469747
469840
  return /* @__PURE__ */ jsx_dev_runtime412.jsxDEV(ThemedBox_default, {
469748
469841
  paddingLeft: 2,
469749
469842
  children: /* @__PURE__ */ jsx_dev_runtime412.jsxDEV(ThemedText, {
@@ -469784,7 +469877,7 @@ function useMcpConnectivityStatus(t0) {
469784
469877
  if (getIsRemoteMode()) {
469785
469878
  return;
469786
469879
  }
469787
- const failedLocalClients = mcpClients.filter(_temp183);
469880
+ const failedLocalClients = mcpClients.filter(_temp181);
469788
469881
  const failedClaudeAiClients = mcpClients.filter(_temp279);
469789
469882
  const needsAuthLocalServers = mcpClients.filter(_temp350);
469790
469883
  const needsAuthClaudeAiServers = mcpClients.filter(_temp436);
@@ -469911,7 +470004,7 @@ function _temp350(client_1) {
469911
470004
  function _temp279(client_0) {
469912
470005
  return false;
469913
470006
  }
469914
- function _temp183(client) {
470007
+ function _temp181(client) {
469915
470008
  return client.type === "failed" && client.config.type !== "sse-ide" && client.config.type !== "ws-ide" && client.config.type !== "claudeai-proxy";
469916
470009
  }
469917
470010
  var import_compiler_runtime310, import_react262, jsx_dev_runtime413, EMPTY_MCP_CLIENTS;
@@ -469974,7 +470067,7 @@ function useLspInitializationNotification() {
469974
470067
  addNotification
469975
470068
  } = useNotifications();
469976
470069
  const setAppState = useSetAppState();
469977
- const [shouldPoll, setShouldPoll] = React126.useState(_temp184);
470070
+ const [shouldPoll, setShouldPoll] = React126.useState(_temp183);
469978
470071
  let t0;
469979
470072
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
469980
470073
  t0 = new Set;
@@ -470101,7 +470194,7 @@ function _temp280(e) {
470101
470194
  }
470102
470195
  return `${e.type}:${e.source}`;
470103
470196
  }
470104
- function _temp184() {
470197
+ function _temp183() {
470105
470198
  return isEnvTruthy2("true");
470106
470199
  }
470107
470200
  var import_compiler_runtime311, React126, jsx_dev_runtime414, LSP_POLL_INTERVAL_MS = 5000;
@@ -470433,7 +470526,7 @@ var init_usePluginRecommendationBase = __esm(() => {
470433
470526
  import { extname as extname19, join as join173 } from "path";
470434
470527
  function useLspPluginRecommendation() {
470435
470528
  const $ = import_compiler_runtime313.c(12);
470436
- const trackedFiles = useAppState(_temp185);
470529
+ const trackedFiles = useAppState(_temp184);
470437
470530
  const {
470438
470531
  addNotification
470439
470532
  } = useNotifications();
@@ -470577,7 +470670,7 @@ function _temp281(current) {
470577
470670
  lspRecommendationDisabled: true
470578
470671
  };
470579
470672
  }
470580
- function _temp185(s) {
470673
+ function _temp184(s) {
470581
470674
  return s.fileHistory.trackedFiles;
470582
470675
  }
470583
470676
  var import_compiler_runtime313, React128, TIMEOUT_THRESHOLD_MS = 28000;
@@ -470972,7 +471065,7 @@ function usePluginInstallationStatus() {
470972
471065
  const {
470973
471066
  addNotification
470974
471067
  } = useNotifications();
470975
- const installationStatus = useAppState(_temp186);
471068
+ const installationStatus = useAppState(_temp185);
470976
471069
  let t0;
470977
471070
  bb0: {
470978
471071
  if (!installationStatus) {
@@ -471098,7 +471191,7 @@ function _temp351(p) {
471098
471191
  function _temp282(m) {
471099
471192
  return m.status === "failed";
471100
471193
  }
471101
- function _temp186(s) {
471194
+ function _temp185(s) {
471102
471195
  return s.plugins.installationStatus;
471103
471196
  }
471104
471197
  var import_compiler_runtime315, import_react264, jsx_dev_runtime418;
@@ -471159,7 +471252,7 @@ function usePluginAutoupdateNotification() {
471159
471252
  if (updatedPlugins.length === 0) {
471160
471253
  return;
471161
471254
  }
471162
- const pluginNames = updatedPlugins.map(_temp187);
471255
+ const pluginNames = updatedPlugins.map(_temp186);
471163
471256
  const displayNames = pluginNames.length <= 2 ? pluginNames.join(" and ") : `${pluginNames.length} plugins`;
471164
471257
  addNotification({
471165
471258
  key: "plugin-autoupdate-restart",
@@ -471196,7 +471289,7 @@ function usePluginAutoupdateNotification() {
471196
471289
  }
471197
471290
  import_react265.useEffect(t3, t4);
471198
471291
  }
471199
- function _temp187(id) {
471292
+ function _temp186(id) {
471200
471293
  const atIndex = id.indexOf("@");
471201
471294
  return atIndex > 0 ? id.substring(0, atIndex) : id;
471202
471295
  }
@@ -471591,7 +471684,7 @@ function AwsAuthStatusBox() {
471591
471684
  t4 = status.output.length > 0 && /* @__PURE__ */ jsx_dev_runtime420.jsxDEV(ThemedBox_default, {
471592
471685
  flexDirection: "column",
471593
471686
  marginTop: 1,
471594
- children: status.output.slice(-5).map(_temp188)
471687
+ children: status.output.slice(-5).map(_temp187)
471595
471688
  }, undefined, false, undefined, this);
471596
471689
  $[4] = status.output;
471597
471690
  $[5] = t4;
@@ -471634,7 +471727,7 @@ function AwsAuthStatusBox() {
471634
471727
  }
471635
471728
  return t6;
471636
471729
  }
471637
- function _temp188(line, index) {
471730
+ function _temp187(line, index) {
471638
471731
  const m = line.match(URL_RE);
471639
471732
  if (!m) {
471640
471733
  return /* @__PURE__ */ jsx_dev_runtime420.jsxDEV(ThemedText, {
@@ -471717,9 +471810,9 @@ var init_useDeprecationWarningNotification = __esm(() => {
471717
471810
 
471718
471811
  // src/tui/hooks/notifs/useNpmDeprecationNotification.tsx
471719
471812
  function useNpmDeprecationNotification() {
471720
- useStartupNotification(_temp189);
471813
+ useStartupNotification(_temp188);
471721
471814
  }
471722
- async function _temp189() {
471815
+ async function _temp188() {
471723
471816
  if (isInBundledMode2() || isEnvTruthy2(process.env.DISABLE_INSTALLATION_CHECKS)) {
471724
471817
  return null;
471725
471818
  }
@@ -471897,7 +471990,7 @@ function _temp283(hasShownHintRef_0, addNotification_0) {
471897
471990
  const ideName_0 = infos[0]?.name;
471898
471991
  if (ideName_0 && !hasShownHintRef_0.current) {
471899
471992
  hasShownHintRef_0.current = true;
471900
- saveGlobalConfig(_temp190);
471993
+ saveGlobalConfig(_temp189);
471901
471994
  addNotification_0({
471902
471995
  key: "ide-status-hint",
471903
471996
  jsx: /* @__PURE__ */ jsx_dev_runtime421.jsxDEV(ThemedText, {
@@ -471915,7 +472008,7 @@ function _temp283(hasShownHintRef_0, addNotification_0) {
471915
472008
  }
471916
472009
  });
471917
472010
  }
471918
- function _temp190(current) {
472011
+ function _temp189(current) {
471919
472012
  return {
471920
472013
  ...current,
471921
472014
  ideHintShownCount: (current.ideHintShownCount ?? 0) + 1
@@ -472244,7 +472337,7 @@ function DevBar() {
472244
472337
  }
472245
472338
  let t1;
472246
472339
  if ($[1] !== slowOps) {
472247
- t1 = slowOps.slice(-3).map(_temp191).join(" · ");
472340
+ t1 = slowOps.slice(-3).map(_temp190).join(" · ");
472248
472341
  $[1] = slowOps;
472249
472342
  $[2] = t1;
472250
472343
  } else {
@@ -472268,7 +472361,7 @@ function DevBar() {
472268
472361
  }
472269
472362
  return t2;
472270
472363
  }
472271
- function _temp191(op) {
472364
+ function _temp190(op) {
472272
472365
  return `${op.operation} (${Math.round(op.durationMs)}ms)`;
472273
472366
  }
472274
472367
  var import_compiler_runtime321, import_react272, jsx_dev_runtime423;
@@ -474720,9 +474813,9 @@ function AnimatedTerminalTitle(t0) {
474720
474813
  return null;
474721
474814
  }
474722
474815
  function _temp284(setFrame_0) {
474723
- return setFrame_0(_temp192);
474816
+ return setFrame_0(_temp191);
474724
474817
  }
474725
- function _temp192(f) {
474818
+ function _temp191(f) {
474726
474819
  return (f + 1) % TITLE_ANIMATION_FRAMES.length;
474727
474820
  }
474728
474821
  function REPL({
@@ -478254,7 +478347,7 @@ function MCPServerMultiselectDialog(t0) {
478254
478347
  }
478255
478348
  let t5;
478256
478349
  if ($[7] !== serverNames) {
478257
- t5 = serverNames.map(_temp193);
478350
+ t5 = serverNames.map(_temp192);
478258
478351
  $[7] = serverNames;
478259
478352
  $[8] = t5;
478260
478353
  } else {
@@ -478343,7 +478436,7 @@ function MCPServerMultiselectDialog(t0) {
478343
478436
  }
478344
478437
  return t9;
478345
478438
  }
478346
- function _temp193(server_0) {
478439
+ function _temp192(server_0) {
478347
478440
  return {
478348
478441
  label: server_0,
478349
478442
  value: server_0
@@ -478622,7 +478715,7 @@ function PreflightStep(t0) {
478622
478715
  onSuccess();
478623
478716
  } else {
478624
478717
  if (result && !result.success) {
478625
- const timer = setTimeout(_temp194, 100);
478718
+ const timer = setTimeout(_temp193, 100);
478626
478719
  return () => clearTimeout(timer);
478627
478720
  }
478628
478721
  }
@@ -478715,7 +478808,7 @@ function PreflightStep(t0) {
478715
478808
  }
478716
478809
  return t6;
478717
478810
  }
478718
- function _temp194() {
478811
+ function _temp193() {
478719
478812
  return process.exit(1);
478720
478813
  }
478721
478814
  var import_compiler_runtime327, import_react282, jsx_dev_runtime433;
@@ -481014,9 +481107,9 @@ function _temp352(tool_0) {
481014
481107
  return tool_0 === BASH_TOOL_NAME2 || tool_0.startsWith(BASH_TOOL_NAME2 + "(");
481015
481108
  }
481016
481109
  function _temp285(command) {
481017
- return command.type === "prompt" && command.loadedFrom === "commands_DEPRECATED" && (command.source === "projectSettings" || command.source === "localSettings") && command.allowedTools?.some(_temp195);
481110
+ return command.type === "prompt" && command.loadedFrom === "commands_DEPRECATED" && (command.source === "projectSettings" || command.source === "localSettings") && command.allowedTools?.some(_temp194);
481018
481111
  }
481019
- function _temp195(tool) {
481112
+ function _temp194(tool) {
481020
481113
  return tool === BASH_TOOL_NAME2 || tool.startsWith(BASH_TOOL_NAME2 + "(");
481021
481114
  }
481022
481115
  var import_compiler_runtime333, import_react287, jsx_dev_runtime440;
@@ -481052,7 +481145,7 @@ function BypassPermissionsModeDialog(t0) {
481052
481145
  } else {
481053
481146
  t1 = $[0];
481054
481147
  }
481055
- import_react288.default.useEffect(_temp196, t1);
481148
+ import_react288.default.useEffect(_temp195, t1);
481056
481149
  let t2;
481057
481150
  if ($[1] !== onAccept) {
481058
481151
  t2 = function onChange(value) {
@@ -481139,7 +481232,7 @@ function BypassPermissionsModeDialog(t0) {
481139
481232
  function _temp286() {
481140
481233
  gracefulShutdownSync(0);
481141
481234
  }
481142
- function _temp196() {}
481235
+ function _temp195() {}
481143
481236
  var import_compiler_runtime334, import_react288, jsx_dev_runtime441;
481144
481237
  var init_BypassPermissionsModeDialog = __esm(() => {
481145
481238
  init_ink2();
@@ -481753,7 +481846,7 @@ function NoConversationsMessage() {
481753
481846
  } else {
481754
481847
  t0 = $[0];
481755
481848
  }
481756
- useKeybinding("app:interrupt", _temp197, t0);
481849
+ useKeybinding("app:interrupt", _temp196, t0);
481757
481850
  let t1;
481758
481851
  if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
481759
481852
  t1 = /* @__PURE__ */ jsx_dev_runtime444.jsxDEV(ThemedBox_default, {
@@ -481774,7 +481867,7 @@ function NoConversationsMessage() {
481774
481867
  }
481775
481868
  return t1;
481776
481869
  }
481777
- function _temp197() {
481870
+ function _temp196() {
481778
481871
  process.exit(1);
481779
481872
  }
481780
481873
  function CrossProjectMessage(t0) {
@@ -487469,7 +487562,7 @@ function SetupNotes(t0) {
487469
487562
  }
487470
487563
  let t2;
487471
487564
  if ($[1] !== messages) {
487472
- t2 = messages.map(_temp198);
487565
+ t2 = messages.map(_temp197);
487473
487566
  $[1] = messages;
487474
487567
  $[2] = t2;
487475
487568
  } else {
@@ -487493,7 +487586,7 @@ function SetupNotes(t0) {
487493
487586
  }
487494
487587
  return t3;
487495
487588
  }
487496
- function _temp198(message, index) {
487589
+ function _temp197(message, index) {
487497
487590
  return /* @__PURE__ */ jsx_dev_runtime448.jsxDEV(ThemedBox_default, {
487498
487591
  marginLeft: 2,
487499
487592
  children: /* @__PURE__ */ jsx_dev_runtime448.jsxDEV(ThemedText, {