@google/gemini-cli 0.36.0 → 0.37.0-preview.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/bundle/{chunk-UNM3DGTG.js → chunk-33B2YA3V.js} +711 -240
  2. package/bundle/{chunk-2OFO4ODK.js → chunk-43UUP7VO.js} +6717 -4203
  3. package/bundle/{chunk-MYI75E6G.js → chunk-5OOT636U.js} +262 -92
  4. package/bundle/{chunk-GHJNEZXJ.js → chunk-BLL44IGV.js} +777 -294
  5. package/bundle/{chunk-S2IQOR7T.js → chunk-JS5WSGB2.js} +243 -88
  6. package/bundle/{chunk-QVTX2M5J.js → chunk-PPWUMHZT.js} +6355 -4117
  7. package/bundle/chunk-TSSVZ7RZ.js +98376 -0
  8. package/bundle/chunk-U4FACSVX.js +30 -0
  9. package/bundle/{chunk-VB55KQW3.js → chunk-VSXV53B7.js} +11735 -14377
  10. package/bundle/{chunk-EAXTBDLN.js → chunk-WZB27TDF.js} +711 -240
  11. package/bundle/chunk-ZB4UQCX5.js +356418 -0
  12. package/bundle/{core-6V2OYDRU.js → core-RMRIZ3E5.js} +60 -4
  13. package/bundle/{devtoolsService-ZKU2HLK2.js → devtoolsService-2ULAA43E.js} +20 -3
  14. package/bundle/{devtoolsService-UL6JE436.js → devtoolsService-AWVCG2N2.js} +22 -4
  15. package/bundle/devtoolsService-IWSTJYRB.js +871 -0
  16. package/bundle/{devtoolsService-QTW7GHQP.js → devtoolsService-SZYXXACN.js} +20 -3
  17. package/bundle/{core-BMLL5RF4.js → dist-4FKFY6XB.js} +60 -4
  18. package/bundle/{dist-PYC2JXAJ.js → dist-PRDBNGX2.js} +60 -4
  19. package/bundle/dist-TCCEQJDV.js +1942 -0
  20. package/bundle/docs/CONTRIBUTING.md +10 -7
  21. package/bundle/docs/assets/theme-tokyonight-dark.png +0 -0
  22. package/bundle/docs/changelogs/index.md +24 -0
  23. package/bundle/docs/changelogs/latest.md +366 -459
  24. package/bundle/docs/changelogs/preview.md +362 -356
  25. package/bundle/docs/cli/acp-mode.md +126 -0
  26. package/bundle/docs/cli/cli-reference.md +1 -1
  27. package/bundle/docs/cli/notifications.md +5 -5
  28. package/bundle/docs/cli/plan-mode.md +22 -11
  29. package/bundle/docs/cli/sandbox.md +1 -1
  30. package/bundle/docs/cli/settings.md +14 -13
  31. package/bundle/docs/cli/themes.md +5 -0
  32. package/bundle/docs/core/index.md +2 -2
  33. package/bundle/docs/core/subagents.md +134 -23
  34. package/bundle/docs/get-started/gemini-3.md +1 -1
  35. package/bundle/docs/get-started/index.md +127 -1
  36. package/bundle/docs/ide-integration/index.md +99 -24
  37. package/bundle/docs/index.md +0 -2
  38. package/bundle/docs/redirects.json +1 -0
  39. package/bundle/docs/reference/commands.md +1 -3
  40. package/bundle/docs/reference/configuration.md +182 -91
  41. package/bundle/docs/reference/keyboard-shortcuts.md +14 -6
  42. package/bundle/docs/reference/policy-engine.md +36 -31
  43. package/bundle/docs/reference/tools.md +56 -23
  44. package/bundle/docs/resources/quota-and-pricing.md +23 -9
  45. package/bundle/docs/sidebar.json +11 -4
  46. package/bundle/docs/tools/planning.md +6 -4
  47. package/bundle/events-CLX3JQHP.js +12 -0
  48. package/bundle/gemini.js +342 -52
  49. package/bundle/{interactiveCli-VLQHRXHU.js → interactiveCli-24VGI5NV.js} +5066 -4010
  50. package/bundle/{interactiveCli-A6HZ2TDO.js → interactiveCli-D2MTTARB.js} +5066 -4010
  51. package/bundle/{interactiveCli-DWMSDCKV.js → interactiveCli-DX76MWWT.js} +5296 -4223
  52. package/bundle/interactiveCli-VNDJAKWG.js +50355 -0
  53. package/bundle/{memoryDiscovery-BQGYT4OD.js → memoryDiscovery-A265O6ML.js} +3 -1
  54. package/bundle/{memoryDiscovery-FCEPFZ3M.js → memoryDiscovery-H6J7KIH2.js} +3 -1
  55. package/bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js +26 -19
  56. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.d.ts +1 -1
  57. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js +1 -1
  58. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js.map +1 -1
  59. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js +35 -1
  60. package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js.map +1 -1
  61. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  62. package/bundle/{oauth2-provider-5ENESIRQ.js → oauth2-provider-FZUTS3SV.js} +2 -2
  63. package/bundle/{oauth2-provider-CAKFQRQV.js → oauth2-provider-K25DXIWC.js} +2 -2
  64. package/bundle/{oauth2-provider-RVED6DAZ.js → oauth2-provider-N73M7SQI.js} +39 -73
  65. package/bundle/oauth2-provider-RMDEEXSP.js +237 -0
  66. package/bundle/policies/discovered.toml +7 -0
  67. package/bundle/policies/non-interactive.toml +7 -0
  68. package/bundle/policies/plan.toml +25 -0
  69. package/bundle/policies/read-only.toml +6 -0
  70. package/bundle/policies/sandbox-default.toml +3 -2
  71. package/bundle/policies/write.toml +21 -0
  72. package/bundle/policies/yolo.toml +1 -1
  73. package/package.json +1 -1
  74. package/bundle/docs/get-started/examples.md +0 -141
@@ -2,7 +2,9 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  AsyncFzf,
4
4
  AuthProviderType,
5
+ AuthType,
5
6
  Config,
7
+ CoreToolCallStatus,
6
8
  DEFAULT_MODEL_CONFIGS,
7
9
  DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD,
8
10
  ExitCodes,
@@ -14,17 +16,26 @@ import {
14
16
  ExtensionUninstallEvent,
15
17
  ExtensionUpdateEvent,
16
18
  GEMINI_CLI_COMPANION_EXTENSION_NAME,
19
+ HookType,
20
+ IDEConnectionStatus,
17
21
  INITIAL_HISTORY_LENGTH,
18
22
  IdeClient,
19
23
  IdeConnectionEvent,
24
+ IdeConnectionType,
25
+ IntegrityDataStatus,
20
26
  KeychainTokenStorage,
27
+ LlmRole,
28
+ MCPDiscoveryState,
21
29
  MCPOAuthTokenStorage,
30
+ MCPServerStatus,
22
31
  MaxBufferError,
23
32
  ModelSlashCommandEvent,
24
33
  ProjectIdRequiredError,
25
34
  ReadManyFilesTool,
26
35
  RewindEvent,
27
36
  SESSION_FILE_PREFIX,
37
+ SessionEndReason,
38
+ SessionStartSource,
28
39
  ShellExecutionService,
29
40
  StartSessionEvent,
30
41
  TOOL_OUTPUTS_DIR,
@@ -44,6 +55,8 @@ import {
44
55
  convertToRestPayload,
45
56
  createCache,
46
57
  decodeTagName,
58
+ deleteSessionArtifactsAsync,
59
+ deleteSubagentSessionDirAndArtifactsAsync,
47
60
  disableBracketedPasteMode,
48
61
  disableKittyKeyboardProtocol,
49
62
  disableModifyOtherKeys,
@@ -139,6 +152,7 @@ import {
139
152
  require_toml,
140
153
  require_undici,
141
154
  require_valid,
155
+ resetBrowserSession,
142
156
  sanitizeFilenamePart,
143
157
  sessionId,
144
158
  shouldLaunchBrowser,
@@ -153,13 +167,14 @@ import {
153
167
  tokenLimit,
154
168
  uiTelemetryService,
155
169
  yellowBright
156
- } from "./chunk-2OFO4ODK.js";
170
+ } from "./chunk-VSXV53B7.js";
157
171
  import {
158
172
  ApprovalMode,
159
173
  CoreEvent,
160
174
  DiscoveredMCPTool,
161
175
  FatalConfigError,
162
176
  GEMINI_DIR,
177
+ PolicyDecision,
163
178
  REFERENCE_CONTENT_END,
164
179
  REFERENCE_CONTENT_START,
165
180
  Storage,
@@ -181,7 +196,11 @@ import {
181
196
  shortenPath,
182
197
  tildeifyPath,
183
198
  unescapePath
184
- } from "./chunk-MYI75E6G.js";
199
+ } from "./chunk-JS5WSGB2.js";
200
+ import {
201
+ AppEvent,
202
+ appEvents
203
+ } from "./chunk-U4FACSVX.js";
185
204
  import {
186
205
  __commonJS,
187
206
  __export,
@@ -34564,12 +34583,12 @@ var require_prompt = __commonJS({
34564
34583
  var readline = __require("readline");
34565
34584
  var _require = require_util3();
34566
34585
  var action = _require.action;
34567
- var EventEmitter6 = __require("events");
34586
+ var EventEmitter5 = __require("events");
34568
34587
  var _require2 = require_src3();
34569
34588
  var beep2 = _require2.beep;
34570
34589
  var cursor = _require2.cursor;
34571
34590
  var color = require_kleur();
34572
- var Prompt = class extends EventEmitter6 {
34591
+ var Prompt = class extends EventEmitter5 {
34573
34592
  constructor(opts = {}) {
34574
34593
  super();
34575
34594
  this.firstRender = true;
@@ -36569,9 +36588,9 @@ var require_prompts = __commonJS({
36569
36588
  $4.date = (args) => toPrompt("DatePrompt", args);
36570
36589
  $4.confirm = (args) => toPrompt("ConfirmPrompt", args);
36571
36590
  $4.list = (args) => {
36572
- const sep5 = args.separator || ",";
36591
+ const sep4 = args.separator || ",";
36573
36592
  return toPrompt("TextPrompt", args, {
36574
- onSubmit: (str) => str.split(sep5).map((s3) => s3.trim())
36593
+ onSubmit: (str) => str.split(sep4).map((s3) => s3.trim())
36575
36594
  });
36576
36595
  };
36577
36596
  $4.toggle = (args) => toPrompt("TogglePrompt", args);
@@ -37029,10 +37048,10 @@ var require_prompt2 = __commonJS({
37029
37048
  "use strict";
37030
37049
  var readline = __require("readline");
37031
37050
  var { action } = require_util4();
37032
- var EventEmitter6 = __require("events");
37051
+ var EventEmitter5 = __require("events");
37033
37052
  var { beep: beep2, cursor } = require_src3();
37034
37053
  var color = require_kleur();
37035
- var Prompt = class extends EventEmitter6 {
37054
+ var Prompt = class extends EventEmitter5 {
37036
37055
  constructor(opts = {}) {
37037
37056
  super();
37038
37057
  this.firstRender = true;
@@ -38859,9 +38878,9 @@ var require_prompts2 = __commonJS({
38859
38878
  $4.date = (args) => toPrompt("DatePrompt", args);
38860
38879
  $4.confirm = (args) => toPrompt("ConfirmPrompt", args);
38861
38880
  $4.list = (args) => {
38862
- const sep5 = args.separator || ",";
38881
+ const sep4 = args.separator || ",";
38863
38882
  return toPrompt("TextPrompt", args, {
38864
- onSubmit: (str) => str.split(sep5).map((s3) => s3.trim())
38883
+ onSubmit: (str) => str.split(sep4).map((s3) => s3.trim())
38865
38884
  });
38866
38885
  };
38867
38886
  $4.toggle = (args) => toPrompt("TogglePrompt", args);
@@ -43454,24 +43473,25 @@ var require_cli_spinners = __commonJS({
43454
43473
  var import_react = __toESM(require_react(), 1);
43455
43474
  function mapCoreStatusToDisplayStatus(coreStatus) {
43456
43475
  switch (coreStatus) {
43457
- case "validating" /* Validating */:
43476
+ case CoreToolCallStatus.Validating:
43458
43477
  return "Pending" /* Pending */;
43459
- case "awaiting_approval" /* AwaitingApproval */:
43478
+ case CoreToolCallStatus.AwaitingApproval:
43460
43479
  return "Confirming" /* Confirming */;
43461
- case "executing" /* Executing */:
43480
+ case CoreToolCallStatus.Executing:
43462
43481
  return "Executing" /* Executing */;
43463
- case "success" /* Success */:
43482
+ case CoreToolCallStatus.Success:
43464
43483
  return "Success" /* Success */;
43465
- case "cancelled" /* Cancelled */:
43484
+ case CoreToolCallStatus.Cancelled:
43466
43485
  return "Canceled" /* Canceled */;
43467
- case "error" /* Error */:
43486
+ case CoreToolCallStatus.Error:
43468
43487
  return "Error" /* Error */;
43469
- case "scheduled" /* Scheduled */:
43488
+ case CoreToolCallStatus.Scheduled:
43470
43489
  return "Pending" /* Pending */;
43471
43490
  default:
43472
43491
  return checkExhaustive(coreStatus);
43473
43492
  }
43474
43493
  }
43494
+ var isTodoList = (res) => typeof res === "object" && res !== null && "todos" in res;
43475
43495
  var emptyIcon = " ";
43476
43496
 
43477
43497
  // packages/cli/src/utils/cleanup.ts
@@ -43509,6 +43529,10 @@ async function runExitCleanup() {
43509
43529
  }
43510
43530
  }
43511
43531
  cleanupFunctions.length = 0;
43532
+ try {
43533
+ await resetBrowserSession();
43534
+ } catch (_2) {
43535
+ }
43512
43536
  if (configForTelemetry) {
43513
43537
  try {
43514
43538
  await configForTelemetry.dispose();
@@ -43607,12 +43631,15 @@ var ConsolePatcher = class {
43607
43631
  };
43608
43632
  formatArgs = (args) => util.format(...args);
43609
43633
  patchConsoleMethod = (type) => (...args) => {
43610
- if (this.params.stderr) {
43611
- if (type !== "debug" || this.params.debugMode) {
43612
- this.originalConsoleError(this.formatArgs(args));
43634
+ if (this.params.interactive === false) {
43635
+ if ((type === "info" || type === "log") && !this.params.debugMode) {
43636
+ return;
43613
43637
  }
43614
- } else {
43615
- if (type !== "debug" || this.params.debugMode) {
43638
+ }
43639
+ if (type !== "debug" || this.params.debugMode) {
43640
+ if (this.params.stderr) {
43641
+ this.originalConsoleError(this.formatArgs(args));
43642
+ } else {
43616
43643
  this.params.onNewMessage?.({
43617
43644
  type,
43618
43645
  content: this.formatArgs(args),
@@ -56110,6 +56137,10 @@ var COMPLETED_SHELL_MAX_LINES = 15;
56110
56137
  var SUBAGENT_MAX_LINES = 15;
56111
56138
  var MIN_TERMINAL_WIDTH_FOR_FULL_LABEL = 100;
56112
56139
  var DEFAULT_COMPRESSION_THRESHOLD = 0.5;
56140
+ var SKILLS_DOCS_URL = "https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/skills.md";
56141
+ var COMPACT_TOOL_SUBVIEW_MAX_LINES = 15;
56142
+ var MAX_SHELL_OUTPUT_SIZE = 1e7;
56143
+ var SHELL_OUTPUT_TRUNCATION_BUFFER = 1e6;
56113
56144
 
56114
56145
  // packages/cli/src/ui/themes/theme.ts
56115
56146
  var import_tinygradient = __toESM(require_tinygradient(), 1);
@@ -58594,7 +58625,7 @@ function convertSessionToHistoryFormats(messages) {
58594
58625
  name: tool.displayName || tool.name,
58595
58626
  description: tool.description || "",
58596
58627
  renderOutputAsMarkdown: tool.renderOutputAsMarkdown ?? true,
58597
- status: tool.status === "success" ? "success" /* Success */ : "error" /* Error */,
58628
+ status: tool.status === "success" ? CoreToolCallStatus.Success : CoreToolCallStatus.Error,
58598
58629
  resultDisplay: tool.resultDisplay,
58599
58630
  confirmationDetails: void 0
58600
58631
  }))
@@ -58627,33 +58658,11 @@ function deriveShortIdFromFileName(fileName) {
58627
58658
  }
58628
58659
  return null;
58629
58660
  }
58630
- function getSessionLogPath(tempDir, safeSessionId) {
58631
- return path4.join(tempDir, "logs", `session-${safeSessionId}.jsonl`);
58632
- }
58633
- async function deleteSessionArtifactsAsync(sessionId2, config) {
58661
+ async function cleanupSessionAndSubagentsAsync(sessionId2, config) {
58634
58662
  const tempDir = config.storage.getProjectTempDir();
58635
- const logsDir = path4.join(tempDir, "logs");
58636
- const safeSessionId = sanitizeFilenamePart(sessionId2);
58637
- const logPath = getSessionLogPath(tempDir, safeSessionId);
58638
- if (logPath.startsWith(logsDir)) {
58639
- await fs8.unlink(logPath).catch(() => {
58640
- });
58641
- }
58642
- const toolOutputDir = path4.join(
58643
- tempDir,
58644
- TOOL_OUTPUTS_DIR,
58645
- `session-${safeSessionId}`
58646
- );
58647
- const toolOutputsBase = path4.join(tempDir, TOOL_OUTPUTS_DIR);
58648
- if (toolOutputDir.startsWith(toolOutputsBase)) {
58649
- await fs8.rm(toolOutputDir, { recursive: true, force: true }).catch(() => {
58650
- });
58651
- }
58652
- const sessionDir = path4.join(tempDir, safeSessionId);
58653
- if (safeSessionId && sessionDir.startsWith(tempDir + path4.sep)) {
58654
- await fs8.rm(sessionDir, { recursive: true, force: true }).catch(() => {
58655
- });
58656
- }
58663
+ const chatsDir = path4.join(tempDir, "chats");
58664
+ await deleteSessionArtifactsAsync(sessionId2, tempDir);
58665
+ await deleteSubagentSessionDirAndArtifactsAsync(sessionId2, chatsDir, tempDir);
58657
58666
  }
58658
58667
  async function cleanupExpiredSessions(config, settings) {
58659
58668
  const result = {
@@ -58717,7 +58726,7 @@ async function cleanupExpiredSessions(config, settings) {
58717
58726
  if (!fullSessionId || fullSessionId !== config.getSessionId()) {
58718
58727
  await fs8.unlink(filePath);
58719
58728
  if (fullSessionId) {
58720
- await deleteSessionArtifactsAsync(fullSessionId, config);
58729
+ await cleanupSessionAndSubagentsAsync(fullSessionId, config);
58721
58730
  }
58722
58731
  result.deleted++;
58723
58732
  } else {
@@ -58738,7 +58747,7 @@ async function cleanupExpiredSessions(config, settings) {
58738
58747
  await fs8.unlink(sessionPath);
58739
58748
  const sessionId2 = sessionToDelete.sessionInfo?.id;
58740
58749
  if (sessionId2) {
58741
- await deleteSessionArtifactsAsync(sessionId2, config);
58750
+ await cleanupSessionAndSubagentsAsync(sessionId2, config);
58742
58751
  }
58743
58752
  if (config.getDebugMode()) {
58744
58753
  debugLogger.debug(
@@ -59132,7 +59141,7 @@ var SETTINGS_SCHEMA = {
59132
59141
  category: "General",
59133
59142
  requiresRestart: false,
59134
59143
  default: false,
59135
- description: "Enable run-event notifications for action-required prompts and session completion. Currently macOS only.",
59144
+ description: "Enable run-event notifications for action-required prompts and session completion.",
59136
59145
  showInDialog: true
59137
59146
  },
59138
59147
  checkpointing: {
@@ -59164,13 +59173,22 @@ var SETTINGS_SCHEMA = {
59164
59173
  description: "Planning features configuration.",
59165
59174
  showInDialog: false,
59166
59175
  properties: {
59176
+ enabled: {
59177
+ type: "boolean",
59178
+ label: "Enable Plan Mode",
59179
+ category: "General",
59180
+ requiresRestart: true,
59181
+ default: true,
59182
+ description: "Enable Plan Mode for read-only safety during planning.",
59183
+ showInDialog: true
59184
+ },
59167
59185
  directory: {
59168
59186
  type: "string",
59169
59187
  label: "Plan Directory",
59170
59188
  category: "General",
59171
59189
  requiresRestart: true,
59172
59190
  default: void 0,
59173
- description: "The directory where planning artifacts are stored. If not specified, defaults to the system temporary directory.",
59191
+ description: "The directory where planning artifacts are stored. If not specified, defaults to the system temporary directory. A custom directory requires a policy to allow write access in Plan Mode.",
59174
59192
  showInDialog: true
59175
59193
  },
59176
59194
  modelRouting: {
@@ -59418,6 +59436,15 @@ var SETTINGS_SCHEMA = {
59418
59436
  description: 'Show the "? for shortcuts" hint above the input.',
59419
59437
  showInDialog: true
59420
59438
  },
59439
+ compactToolOutput: {
59440
+ type: "boolean",
59441
+ label: "Compact Tool Output",
59442
+ category: "UI",
59443
+ requiresRestart: false,
59444
+ default: false,
59445
+ description: "Display tool outputs (like directory listings and file reads) in a compact, structured format.",
59446
+ showInDialog: true
59447
+ },
59421
59448
  hideBanner: {
59422
59449
  type: "boolean",
59423
59450
  label: "Hide Banner",
@@ -60029,6 +60056,15 @@ var SETTINGS_SCHEMA = {
60029
60056
  description: "Disable user input on browser window during automation.",
60030
60057
  showInDialog: false
60031
60058
  },
60059
+ maxActionsPerTask: {
60060
+ type: "number",
60061
+ label: "Max Actions Per Task",
60062
+ category: "Advanced",
60063
+ requiresRestart: false,
60064
+ default: 100,
60065
+ description: "The maximum number of tool calls allowed per browser task. Enforcement is hard: the agent will be terminated when the limit is reached.",
60066
+ showInDialog: false
60067
+ },
60032
60068
  confirmSensitiveActions: {
60033
60069
  type: "boolean",
60034
60070
  label: "Confirm Sensitive Actions",
@@ -60097,6 +60133,16 @@ var SETTINGS_SCHEMA = {
60097
60133
  description: "Maximum number of directories to search for memory.",
60098
60134
  showInDialog: true
60099
60135
  },
60136
+ memoryBoundaryMarkers: {
60137
+ type: "array",
60138
+ label: "Memory Boundary Markers",
60139
+ category: "Context",
60140
+ requiresRestart: true,
60141
+ default: [".git"],
60142
+ description: "File or directory names that mark the boundary for GEMINI.md discovery. The upward traversal stops at the first directory containing any of these markers. An empty array disables parent traversal.",
60143
+ showInDialog: false,
60144
+ items: { type: "string" }
60145
+ },
60100
60146
  includeDirectories: {
60101
60147
  type: "array",
60102
60148
  label: "Include Directories",
@@ -60248,6 +60294,20 @@ var SETTINGS_SCHEMA = {
60248
60294
  `,
60249
60295
  showInDialog: true
60250
60296
  },
60297
+ backgroundCompletionBehavior: {
60298
+ type: "enum",
60299
+ label: "Background Completion Behavior",
60300
+ category: "Tools",
60301
+ requiresRestart: false,
60302
+ default: "silent",
60303
+ description: "Controls what happens when a background shell command finishes. 'silent' (default): quietly exits in background. 'inject': automatically returns output to agent. 'notify': shows brief message in chat.",
60304
+ showInDialog: false,
60305
+ options: [
60306
+ { label: "Silent", value: "silent" },
60307
+ { label: "Inject", value: "inject" },
60308
+ { label: "Notify", value: "notify" }
60309
+ ]
60310
+ },
60251
60311
  pager: {
60252
60312
  type: "string",
60253
60313
  label: "Pager",
@@ -60670,54 +60730,6 @@ var SETTINGS_SCHEMA = {
60670
60730
  description: "Setting to enable experimental features",
60671
60731
  showInDialog: false,
60672
60732
  properties: {
60673
- toolOutputMasking: {
60674
- type: "object",
60675
- label: "Tool Output Masking",
60676
- category: "Experimental",
60677
- requiresRestart: true,
60678
- ignoreInDocs: false,
60679
- default: {},
60680
- description: "Advanced settings for tool output masking to manage context window efficiency.",
60681
- showInDialog: false,
60682
- properties: {
60683
- enabled: {
60684
- type: "boolean",
60685
- label: "Enable Tool Output Masking",
60686
- category: "Experimental",
60687
- requiresRestart: true,
60688
- default: true,
60689
- description: "Enables tool output masking to save tokens.",
60690
- showInDialog: true
60691
- },
60692
- toolProtectionThreshold: {
60693
- type: "number",
60694
- label: "Tool Protection Threshold",
60695
- category: "Experimental",
60696
- requiresRestart: true,
60697
- default: 5e4,
60698
- description: "Minimum number of tokens to protect from masking (most recent tool outputs).",
60699
- showInDialog: false
60700
- },
60701
- minPrunableTokensThreshold: {
60702
- type: "number",
60703
- label: "Min Prunable Tokens Threshold",
60704
- category: "Experimental",
60705
- requiresRestart: true,
60706
- default: 3e4,
60707
- description: "Minimum prunable tokens required to trigger a masking pass.",
60708
- showInDialog: false
60709
- },
60710
- protectLatestTurn: {
60711
- type: "boolean",
60712
- label: "Protect Latest Turn",
60713
- category: "Experimental",
60714
- requiresRestart: true,
60715
- default: true,
60716
- description: "Ensures the absolute latest turn is never masked, regardless of token count.",
60717
- showInDialog: false
60718
- }
60719
- }
60720
- },
60721
60733
  enableAgents: {
60722
60734
  type: "boolean",
60723
60735
  label: "Enable Agents",
@@ -60808,15 +60820,6 @@ var SETTINGS_SCHEMA = {
60808
60820
  description: "Use OSC 52 for copying. This may be more robust than the default system when using remote terminal sessions (if your terminal is configured to allow it).",
60809
60821
  showInDialog: true
60810
60822
  },
60811
- plan: {
60812
- type: "boolean",
60813
- label: "Plan",
60814
- category: "Experimental",
60815
- requiresRestart: true,
60816
- default: true,
60817
- description: "Enable Plan Mode.",
60818
- showInDialog: true
60819
- },
60820
60823
  taskTracker: {
60821
60824
  type: "boolean",
60822
60825
  label: "Task Tracker",
@@ -60911,6 +60914,15 @@ var SETTINGS_SCHEMA = {
60911
60914
  description: "Replace the built-in save_memory tool with a memory manager subagent that supports adding, removing, de-duplicating, and organizing memories.",
60912
60915
  showInDialog: true
60913
60916
  },
60917
+ contextManagement: {
60918
+ type: "boolean",
60919
+ label: "Enable Context Management",
60920
+ category: "Experimental",
60921
+ requiresRestart: true,
60922
+ default: false,
60923
+ description: "Enable logic for context management.",
60924
+ showInDialog: true
60925
+ },
60914
60926
  topicUpdateNarration: {
60915
60927
  type: "boolean",
60916
60928
  label: "Topic & Update Narration",
@@ -61166,6 +61178,159 @@ var SETTINGS_SCHEMA = {
61166
61178
  mergeStrategy: "concat" /* CONCAT */
61167
61179
  }
61168
61180
  },
61181
+ contextManagement: {
61182
+ type: "object",
61183
+ label: "Context Management",
61184
+ category: "Experimental",
61185
+ requiresRestart: true,
61186
+ default: {},
61187
+ description: "Settings for agent history and tool distillation context management.",
61188
+ showInDialog: false,
61189
+ properties: {
61190
+ historyWindow: {
61191
+ type: "object",
61192
+ label: "History Window Settings",
61193
+ category: "Context Management",
61194
+ requiresRestart: true,
61195
+ default: {},
61196
+ showInDialog: false,
61197
+ properties: {
61198
+ maxTokens: {
61199
+ type: "number",
61200
+ label: "Max Tokens",
61201
+ category: "Context Management",
61202
+ requiresRestart: true,
61203
+ default: 15e4,
61204
+ description: "The number of tokens to allow before triggering compression.",
61205
+ showInDialog: false
61206
+ },
61207
+ retainedTokens: {
61208
+ type: "number",
61209
+ label: "Retained Tokens",
61210
+ category: "Context Management",
61211
+ requiresRestart: true,
61212
+ default: 4e4,
61213
+ description: "The number of tokens to always retain.",
61214
+ showInDialog: false
61215
+ }
61216
+ }
61217
+ },
61218
+ messageLimits: {
61219
+ type: "object",
61220
+ label: "Message Limits",
61221
+ category: "Context Management",
61222
+ requiresRestart: true,
61223
+ default: {},
61224
+ showInDialog: false,
61225
+ properties: {
61226
+ normalMaxTokens: {
61227
+ type: "number",
61228
+ label: "Normal Maximum Tokens",
61229
+ category: "Context Management",
61230
+ requiresRestart: true,
61231
+ default: 2500,
61232
+ description: "The target number of tokens to budget for a normal conversation turn.",
61233
+ showInDialog: false
61234
+ },
61235
+ retainedMaxTokens: {
61236
+ type: "number",
61237
+ label: "Retained Maximum Tokens",
61238
+ category: "Context Management",
61239
+ requiresRestart: true,
61240
+ default: 12e3,
61241
+ description: "The maximum number of tokens a single conversation turn can consume before truncation.",
61242
+ showInDialog: false
61243
+ },
61244
+ normalizationHeadRatio: {
61245
+ type: "number",
61246
+ label: "Normalization Head Ratio",
61247
+ category: "Context Management",
61248
+ requiresRestart: true,
61249
+ default: 0.25,
61250
+ description: "The ratio of tokens to retain from the beginning of a truncated message (0.0 to 1.0).",
61251
+ showInDialog: false
61252
+ }
61253
+ }
61254
+ },
61255
+ tools: {
61256
+ type: "object",
61257
+ label: "Context Management Tools",
61258
+ category: "Context Management",
61259
+ requiresRestart: true,
61260
+ default: {},
61261
+ showInDialog: false,
61262
+ properties: {
61263
+ distillation: {
61264
+ type: "object",
61265
+ label: "Tool Distillation",
61266
+ category: "Context Management",
61267
+ requiresRestart: true,
61268
+ default: {},
61269
+ showInDialog: false,
61270
+ properties: {
61271
+ maxOutputTokens: {
61272
+ type: "number",
61273
+ label: "Max Output Tokens",
61274
+ category: "Context Management",
61275
+ requiresRestart: true,
61276
+ default: 1e4,
61277
+ description: "Maximum tokens to show to the model when truncating large tool outputs.",
61278
+ showInDialog: false
61279
+ },
61280
+ summarizationThresholdTokens: {
61281
+ type: "number",
61282
+ label: "Tool Summarization Threshold",
61283
+ category: "Context Management",
61284
+ requiresRestart: true,
61285
+ default: 2e4,
61286
+ description: "Threshold above which truncated tool outputs will be summarized by an LLM.",
61287
+ showInDialog: false
61288
+ }
61289
+ }
61290
+ },
61291
+ outputMasking: {
61292
+ type: "object",
61293
+ label: "Tool Output Masking",
61294
+ category: "Context Management",
61295
+ requiresRestart: true,
61296
+ ignoreInDocs: false,
61297
+ default: {},
61298
+ description: "Advanced settings for tool output masking to manage context window efficiency.",
61299
+ showInDialog: false,
61300
+ properties: {
61301
+ protectionThresholdTokens: {
61302
+ type: "number",
61303
+ label: "Tool Protection Threshold (Tokens)",
61304
+ category: "Context Management",
61305
+ requiresRestart: true,
61306
+ default: 5e4,
61307
+ description: "Minimum number of tokens to protect from masking (most recent tool outputs).",
61308
+ showInDialog: false
61309
+ },
61310
+ minPrunableThresholdTokens: {
61311
+ type: "number",
61312
+ label: "Min Prunable Tokens Threshold",
61313
+ category: "Context Management",
61314
+ requiresRestart: true,
61315
+ default: 3e4,
61316
+ description: "Minimum prunable tokens required to trigger a masking pass.",
61317
+ showInDialog: false
61318
+ },
61319
+ protectLatestTurn: {
61320
+ type: "boolean",
61321
+ label: "Protect Latest Turn",
61322
+ category: "Context Management",
61323
+ requiresRestart: true,
61324
+ default: true,
61325
+ description: "Ensures the absolute latest turn is never masked, regardless of token count.",
61326
+ showInDialog: false
61327
+ }
61328
+ }
61329
+ }
61330
+ }
61331
+ }
61332
+ }
61333
+ },
61169
61334
  admin: {
61170
61335
  type: "object",
61171
61336
  label: "Admin",
@@ -62417,8 +62582,8 @@ var LoadedSettings = class {
62417
62582
  // React will pass a listener fn into this subscribe fn
62418
62583
  // that listener fn will perform an object identity check on the snapshot and trigger a React re render if the snapshot has changed
62419
62584
  subscribe(listener) {
62420
- coreEvents.on("settings-changed" /* SettingsChanged */, listener);
62421
- return () => coreEvents.off("settings-changed" /* SettingsChanged */, listener);
62585
+ coreEvents.on(CoreEvent.SettingsChanged, listener);
62586
+ return () => coreEvents.off(CoreEvent.SettingsChanged, listener);
62422
62587
  }
62423
62588
  getSnapshot() {
62424
62589
  return this._snapshot;
@@ -62919,7 +63084,7 @@ function migrateExperimentalSettings(settings, loadedSettings, scope, removeDepr
62919
63084
  let modified = false;
62920
63085
  const migrateExperimental = (oldKey, migrateFn) => {
62921
63086
  const old = experimentalSettings[oldKey];
62922
- if (old) {
63087
+ if (old !== void 0) {
62923
63088
  foundDeprecated?.push(`experimental.${oldKey}`);
62924
63089
  migrateFn(old);
62925
63090
  modified = true;
@@ -62971,6 +63136,21 @@ function migrateExperimentalSettings(settings, loadedSettings, scope, removeDepr
62971
63136
  if (old["enabled"] !== void 0) override["enabled"] = old["enabled"];
62972
63137
  agentsOverrides["cli_help"] = override;
62973
63138
  });
63139
+ migrateExperimental("plan", (planValue) => {
63140
+ const generalSettings = settings.general || {};
63141
+ const newGeneral = { ...generalSettings };
63142
+ const planSettings = (
63143
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
63144
+ newGeneral["plan"] || {}
63145
+ );
63146
+ const newPlan = { ...planSettings };
63147
+ if (newPlan["enabled"] === void 0) {
63148
+ newPlan["enabled"] = planValue;
63149
+ newGeneral["plan"] = newPlan;
63150
+ loadedSettings.setValue(scope, "general", newGeneral);
63151
+ modified = true;
63152
+ }
63153
+ });
62974
63154
  if (modified) {
62975
63155
  agentsSettings["overrides"] = agentsOverrides;
62976
63156
  loadedSettings.setValue(scope, "agents", agentsSettings);
@@ -62978,6 +63158,7 @@ function migrateExperimentalSettings(settings, loadedSettings, scope, removeDepr
62978
63158
  const newExperimental = { ...experimentalSettings };
62979
63159
  delete newExperimental["codebaseInvestigatorSettings"];
62980
63160
  delete newExperimental["cliHelpAgentSettings"];
63161
+ delete newExperimental["plan"];
62981
63162
  loadedSettings.setValue(scope, "experimental", newExperimental);
62982
63163
  }
62983
63164
  return true;
@@ -63274,19 +63455,6 @@ var useFocus = () => {
63274
63455
  };
63275
63456
  };
63276
63457
 
63277
- // packages/cli/src/utils/events.ts
63278
- import { EventEmitter as EventEmitter3 } from "node:events";
63279
- var AppEvent = /* @__PURE__ */ ((AppEvent2) => {
63280
- AppEvent2["OpenDebugConsole"] = "open-debug-console";
63281
- AppEvent2["Flicker"] = "flicker";
63282
- AppEvent2["SelectionWarning"] = "selection-warning";
63283
- AppEvent2["PasteTimeout"] = "paste-timeout";
63284
- AppEvent2["TerminalBackground"] = "terminal-background";
63285
- AppEvent2["TransientMessage"] = "transient-message";
63286
- return AppEvent2;
63287
- })(AppEvent || {});
63288
- var appEvents = new EventEmitter3();
63289
-
63290
63458
  // packages/cli/src/ui/utils/terminalCapabilityManager.ts
63291
63459
  import * as fs11 from "node:fs";
63292
63460
 
@@ -63531,6 +63699,12 @@ var TerminalCapabilityManager = class _TerminalCapabilityManager {
63531
63699
  isKittyProtocolEnabled() {
63532
63700
  return this.kittyEnabled;
63533
63701
  }
63702
+ isGhosttyTerminal(env3 = process.env) {
63703
+ const termProgram = env3["TERM_PROGRAM"]?.toLowerCase();
63704
+ const term = env3["TERM"]?.toLowerCase();
63705
+ const name = this.getTerminalName()?.toLowerCase();
63706
+ return !!(name?.includes("ghostty") || termProgram?.includes("ghostty") || term?.includes("ghostty"));
63707
+ }
63534
63708
  supportsOsc9Notifications(env3 = process.env) {
63535
63709
  if (env3["WT_SESSION"]) {
63536
63710
  return false;
@@ -64244,6 +64418,7 @@ var Command = /* @__PURE__ */ ((Command2) => {
64244
64418
  Command2["EXPAND_SUGGESTION"] = "suggest.expand";
64245
64419
  Command2["COLLAPSE_SUGGESTION"] = "suggest.collapse";
64246
64420
  Command2["SUBMIT"] = "input.submit";
64421
+ Command2["QUEUE_MESSAGE"] = "input.queueMessage";
64247
64422
  Command2["NEWLINE"] = "input.newline";
64248
64423
  Command2["OPEN_EXTERNAL_EDITOR"] = "input.openExternalEditor";
64249
64424
  Command2["PASTE_CLIPBOARD"] = "input.paste";
@@ -64270,6 +64445,8 @@ var Command = /* @__PURE__ */ ((Command2) => {
64270
64445
  Command2["UNFOCUS_BACKGROUND_SHELL"] = "background.unfocus";
64271
64446
  Command2["UNFOCUS_BACKGROUND_SHELL_LIST"] = "background.unfocusList";
64272
64447
  Command2["SHOW_BACKGROUND_SHELL_UNFOCUS_WARNING"] = "background.unfocusWarning";
64448
+ Command2["UPDATE_EXTENSION"] = "extension.update";
64449
+ Command2["LINK_EXTENSION"] = "extension.link";
64273
64450
  return Command2;
64274
64451
  })(Command || {});
64275
64452
  var KeyBinding = class _KeyBinding {
@@ -64479,6 +64656,7 @@ var defaultKeyBindingConfig = /* @__PURE__ */ new Map([
64479
64656
  // Text Input
64480
64657
  // Must also exclude shift to allow shift+enter for newline
64481
64658
  ["input.submit" /* SUBMIT */, [new KeyBinding("enter")]],
64659
+ ["input.queueMessage" /* QUEUE_MESSAGE */, [new KeyBinding("tab")]],
64482
64660
  [
64483
64661
  "input.newline" /* NEWLINE */,
64484
64662
  [
@@ -64522,7 +64700,10 @@ var defaultKeyBindingConfig = /* @__PURE__ */ new Map([
64522
64700
  ["background.kill" /* KILL_BACKGROUND_SHELL */, [new KeyBinding("ctrl+k")]],
64523
64701
  ["background.unfocus" /* UNFOCUS_BACKGROUND_SHELL */, [new KeyBinding("shift+tab")]],
64524
64702
  ["background.unfocusList" /* UNFOCUS_BACKGROUND_SHELL_LIST */, [new KeyBinding("tab")]],
64525
- ["background.unfocusWarning" /* SHOW_BACKGROUND_SHELL_UNFOCUS_WARNING */, [new KeyBinding("tab")]]
64703
+ ["background.unfocusWarning" /* SHOW_BACKGROUND_SHELL_UNFOCUS_WARNING */, [new KeyBinding("tab")]],
64704
+ // Extension Controls
64705
+ ["extension.update" /* UPDATE_EXTENSION */, [new KeyBinding("i")]],
64706
+ ["extension.link" /* LINK_EXTENSION */, [new KeyBinding("l")]]
64526
64707
  ]);
64527
64708
  var keybindingsSchema = external_exports.array(
64528
64709
  external_exports.object({
@@ -66644,6 +66825,152 @@ var XCode = new Theme(
66644
66825
  xcodeColors
66645
66826
  );
66646
66827
 
66828
+ // packages/cli/src/ui/themes/builtin/dark/tokyonight-dark.ts
66829
+ var palette = {
66830
+ bg: "#1a1b26",
66831
+ bg_dark: "#16161e",
66832
+ bg_dark1: "#0C0E14",
66833
+ bg_highlight: "#292e42",
66834
+ blue: "#7aa2f7",
66835
+ blue0: "#3d59a1",
66836
+ blue1: "#2ac3de",
66837
+ blue2: "#0db9d7",
66838
+ blue5: "#89ddff",
66839
+ blue6: "#b4f9f8",
66840
+ blue7: "#394b70",
66841
+ comment: "#565f89",
66842
+ cyan: "#7dcfff",
66843
+ fg: "#c0caf5",
66844
+ fg_dark: "#a9b1d6",
66845
+ fg_gutter: "#3b4261",
66846
+ green: "#9ece6a",
66847
+ green1: "#73daca",
66848
+ green2: "#41a6b5",
66849
+ magenta: "#bb9af7",
66850
+ magenta2: "#ff007c",
66851
+ orange: "#ff9e64",
66852
+ purple: "#9d7cd8",
66853
+ red: "#f7768e",
66854
+ red1: "#db4b4b",
66855
+ teal: "#1abc9c",
66856
+ yellow: "#e0af68",
66857
+ diff: {
66858
+ add: "#243e4a",
66859
+ change: "#1f2231",
66860
+ delete: "#4a272f"
66861
+ }
66862
+ };
66863
+ var tokyoNightColors = {
66864
+ type: "dark",
66865
+ Background: palette.bg,
66866
+ Foreground: palette.fg,
66867
+ LightBlue: palette.purple,
66868
+ AccentBlue: palette.magenta,
66869
+ AccentPurple: palette.blue,
66870
+ AccentCyan: palette.cyan,
66871
+ AccentGreen: palette.teal,
66872
+ AccentYellow: palette.yellow,
66873
+ AccentRed: palette.red1,
66874
+ DiffAdded: palette.diff.add,
66875
+ DiffRemoved: palette.diff.delete,
66876
+ Comment: palette.comment,
66877
+ Gray: palette.fg_dark,
66878
+ DarkGray: palette.fg_gutter,
66879
+ FocusColor: palette.blue,
66880
+ GradientColors: [palette.blue, palette.magenta, palette.cyan]
66881
+ };
66882
+ var TokyoNight = new Theme(
66883
+ "Tokyo Night",
66884
+ "dark",
66885
+ {
66886
+ hljs: {
66887
+ display: "block",
66888
+ overflowX: "auto",
66889
+ padding: "0.5em",
66890
+ background: palette.bg,
66891
+ color: palette.fg
66892
+ },
66893
+ "hljs-addition": { background: palette.diff.add },
66894
+ "hljs-attr": { color: palette.green1 },
66895
+ "hljs-attribute": { color: palette.green1 },
66896
+ "hljs-brace": { color: palette.fg_dark },
66897
+ "hljs-built_in": { color: palette.blue1 },
66898
+ "hljs-builtin-symbol": { color: palette.blue1 },
66899
+ "hljs-bullet": {
66900
+ color: palette.orange,
66901
+ fontWeight: "bold"
66902
+ },
66903
+ "hljs-char": { color: palette.green },
66904
+ "hljs-char-escape": { color: palette.magenta },
66905
+ "hljs-character": { color: palette.green },
66906
+ "hljs-class": { color: palette.blue1 },
66907
+ "hljs-class-title": { color: palette.blue1 },
66908
+ "hljs-code": { color: palette.green },
66909
+ "hljs-comment": {
66910
+ color: palette.comment,
66911
+ fontStyle: "italic"
66912
+ },
66913
+ "hljs-computation-expression": { color: palette.cyan },
66914
+ "hljs-deletion": { background: palette.diff.delete },
66915
+ "hljs-doctag": { color: palette.yellow },
66916
+ "hljs-emphasis": { fontStyle: "italic" },
66917
+ "hljs-function": { color: palette.blue },
66918
+ "hljs-function-dispatch": { color: palette.blue },
66919
+ "hljs-keyword": {
66920
+ color: palette.magenta,
66921
+ fontStyle: "italic"
66922
+ },
66923
+ "hljs-label": { color: palette.blue },
66924
+ "hljs-link": { color: palette.teal },
66925
+ "hljs-literal": { color: palette.orange },
66926
+ "hljs-message-name": { color: palette.blue },
66927
+ "hljs-meta": { color: palette.cyan },
66928
+ "hljs-meta-prompt": { color: palette.fg_dark },
66929
+ "hljs-name": { color: palette.magenta },
66930
+ "hljs-named-character": { color: palette.blue1 },
66931
+ "hljs-number": { color: palette.orange },
66932
+ "hljs-operator": { color: palette.blue5 },
66933
+ "hljs-params": { color: palette.yellow },
66934
+ "hljs-property": { color: palette.green1 },
66935
+ "hljs-punctuation": { color: palette.fg_dark },
66936
+ "hljs-quote": {
66937
+ color: palette.comment,
66938
+ fontStyle: "italic"
66939
+ },
66940
+ "hljs-regex": { color: palette.blue6 },
66941
+ "hljs-regexp": { color: palette.blue6 },
66942
+ "hljs-rest_arg": {
66943
+ color: interpolateColor(palette.yellow, palette.fg, 0.8)
66944
+ },
66945
+ "hljs-section": {
66946
+ color: palette.blue,
66947
+ fontWeight: "bold"
66948
+ },
66949
+ "hljs-selector-attr": { color: palette.cyan },
66950
+ "hljs-selector-class": { color: palette.green1 },
66951
+ "hljs-selector-id": { color: palette.green1 },
66952
+ "hljs-selector-pseudo": { color: palette.cyan },
66953
+ "hljs-selector-tag": { color: palette.magenta },
66954
+ "hljs-string": { color: palette.green },
66955
+ "hljs-strong": { fontWeight: "bold" },
66956
+ "hljs-subst": { color: palette.blue5 },
66957
+ "hljs-symbol": { color: palette.magenta },
66958
+ "hljs-tag": { color: palette.blue1 },
66959
+ "hljs-template-tag": { color: palette.blue5 },
66960
+ "hljs-template-variable": { color: palette.fg },
66961
+ "hljs-title": { color: palette.blue },
66962
+ "hljs-title-class": { color: palette.blue1 },
66963
+ "hljs-title-class-inherited": { color: palette.blue1 },
66964
+ "hljs-title-function": { color: palette.blue },
66965
+ "hljs-title-function-invoke": { color: palette.blue },
66966
+ "hljs-type": { color: palette.blue1 },
66967
+ "hljs-variable": { color: palette.fg },
66968
+ "hljs-variable-constant": { color: palette.orange },
66969
+ "hljs-variable-language": { color: palette.red }
66970
+ },
66971
+ tokyoNightColors
66972
+ );
66973
+
66647
66974
  // packages/cli/src/ui/themes/theme-manager.ts
66648
66975
  import * as fs13 from "node:fs";
66649
66976
  import * as path6 from "node:path";
@@ -67143,6 +67470,7 @@ var ThemeManager = class {
67143
67470
  SolarizedDark,
67144
67471
  SolarizedLight,
67145
67472
  XCode,
67473
+ TokyoNight,
67146
67474
  ANSI,
67147
67475
  ANSILight
67148
67476
  ];
@@ -67718,7 +68046,7 @@ var import_react34 = __toESM(require_react(), 1);
67718
68046
  function useIdeTrustListener() {
67719
68047
  const settings = useSettings();
67720
68048
  const [connectionStatus, setConnectionStatus] = (0, import_react34.useState)(
67721
- "disconnected" /* Disconnected */
68049
+ IDEConnectionStatus.Disconnected
67722
68050
  );
67723
68051
  const previousTrust = (0, import_react34.useRef)(void 0);
67724
68052
  const [restartReason, setRestartReason] = (0, import_react34.useState)("NONE");
@@ -67748,7 +68076,7 @@ function useIdeTrustListener() {
67748
68076
  };
67749
68077
  }, []);
67750
68078
  const getSnapshot = () => {
67751
- if (connectionStatus !== "connected" /* Connected */) {
68079
+ if (connectionStatus !== IDEConnectionStatus.Connected) {
67752
68080
  return void 0;
67753
68081
  }
67754
68082
  return ideContextStore.get()?.workspaceState?.isTrusted;
@@ -68116,8 +68444,8 @@ function getInstallationInfo(projectRoot, isAutoUpdateEnabled) {
68116
68444
  }
68117
68445
 
68118
68446
  // packages/cli/src/utils/updateEventEmitter.ts
68119
- import { EventEmitter as EventEmitter4 } from "node:events";
68120
- var updateEventEmitter = new EventEmitter4();
68447
+ import { EventEmitter as EventEmitter3 } from "node:events";
68448
+ var updateEventEmitter = new EventEmitter3();
68121
68449
 
68122
68450
  // packages/cli/src/utils/spawnWrapper.ts
68123
68451
  import { spawn } from "node:child_process";
@@ -68179,12 +68507,19 @@ Automatic update is not available in sandbox mode.`
68179
68507
  combinedMessage += `
68180
68508
  ${installationInfo.updateMessage}`;
68181
68509
  }
68182
- updateEventEmitter.emit("update-received", {
68183
- message: combinedMessage
68184
- });
68185
68510
  if (!installationInfo.updateCommand || !settings.merged.general.enableAutoUpdate) {
68511
+ updateEventEmitter.emit("update-received", {
68512
+ ...info,
68513
+ message: combinedMessage,
68514
+ isUpdating: false
68515
+ });
68186
68516
  return;
68187
68517
  }
68518
+ updateEventEmitter.emit("update-received", {
68519
+ ...info,
68520
+ message: combinedMessage,
68521
+ isUpdating: true
68522
+ });
68188
68523
  if (_updateInProgress) {
68189
68524
  return;
68190
68525
  }
@@ -72887,7 +73222,7 @@ Would you like to attempt to install via "git clone" instead?`
72887
73222
  newExtensionConfig.version,
72888
73223
  previousExtensionConfig.version,
72889
73224
  installMetadata.type,
72890
- "success" /* Success */
73225
+ CoreToolCallStatus.Success
72891
73226
  )
72892
73227
  );
72893
73228
  if (newExtensionName !== previousName) {
@@ -72910,7 +73245,7 @@ Would you like to attempt to install via "git clone" instead?`
72910
73245
  getExtensionId(newExtensionConfig, installMetadata),
72911
73246
  newExtensionConfig.version,
72912
73247
  installMetadata.type,
72913
- "success" /* Success */
73248
+ CoreToolCallStatus.Success
72914
73249
  )
72915
73250
  );
72916
73251
  await this.enableExtension(
@@ -72943,7 +73278,7 @@ Would you like to attempt to install via "git clone" instead?`
72943
73278
  newExtensionConfig?.version ?? "",
72944
73279
  previousExtensionConfig.version,
72945
73280
  installMetadata.type,
72946
- "error" /* Error */
73281
+ CoreToolCallStatus.Error
72947
73282
  )
72948
73283
  );
72949
73284
  } else {
@@ -72955,7 +73290,7 @@ Would you like to attempt to install via "git clone" instead?`
72955
73290
  extensionId ?? "",
72956
73291
  newExtensionConfig?.version ?? "",
72957
73292
  installMetadata.type,
72958
- "error" /* Error */
73293
+ CoreToolCallStatus.Error
72959
73294
  )
72960
73295
  );
72961
73296
  }
@@ -72986,7 +73321,7 @@ Would you like to attempt to install via "git clone" instead?`
72986
73321
  extension.name,
72987
73322
  hashValue(extension.name),
72988
73323
  extension.id,
72989
- "success" /* Success */
73324
+ CoreToolCallStatus.Success
72990
73325
  )
72991
73326
  );
72992
73327
  }
@@ -73256,7 +73591,7 @@ Would you like to attempt to install via "git clone" instead?`
73256
73591
  if (eventHooks) {
73257
73592
  for (const definition of eventHooks) {
73258
73593
  for (const hook of definition.hooks) {
73259
- if (hook.type === "command" /* Command */) {
73594
+ if (hook.type === HookType.Command) {
73260
73595
  hook.env = { ...hook.env, ...hookEnv };
73261
73596
  }
73262
73597
  }
@@ -73883,7 +74218,7 @@ async function readMcpResources(resourceParts, config, signal) {
73883
74218
  callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
73884
74219
  name: `resources/read (${resource.serverName})`,
73885
74220
  description: resource.uri,
73886
- status: "success" /* Success */,
74221
+ status: CoreToolCallStatus.Success,
73887
74222
  isClientInitiated: true,
73888
74223
  resultDisplay: `Successfully read resource ${resource.uri}`,
73889
74224
  confirmationDetails: void 0
@@ -73898,7 +74233,7 @@ async function readMcpResources(resourceParts, config, signal) {
73898
74233
  callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
73899
74234
  name: `resources/read (${resource.serverName})`,
73900
74235
  description: resource.uri,
73901
- status: "error" /* Error */,
74236
+ status: CoreToolCallStatus.Error,
73902
74237
  isClientInitiated: true,
73903
74238
  resultDisplay: `Error reading resource ${resource.uri}: ${getErrorMessage(error)}`,
73904
74239
  confirmationDetails: void 0
@@ -73923,7 +74258,7 @@ Content from @${result.uri}:
73923
74258
  }
73924
74259
  if (hasError) {
73925
74260
  const firstError = displays.find(
73926
- (d) => d.status === "error" /* Error */
74261
+ (d) => d.status === CoreToolCallStatus.Error
73927
74262
  );
73928
74263
  return {
73929
74264
  parts: [],
@@ -73959,7 +74294,7 @@ async function readLocalFiles(resolvedFiles, config, signal, userMessageTimestam
73959
74294
  callId: `client-read-${userMessageTimestamp}`,
73960
74295
  name: readManyFilesTool.displayName,
73961
74296
  description: invocation.getDescription(),
73962
- status: "success" /* Success */,
74297
+ status: CoreToolCallStatus.Success,
73963
74298
  isClientInitiated: true,
73964
74299
  resultDisplay: result.returnDisplay || `Successfully read: ${fileLabelsForDisplay.join(", ")}`,
73965
74300
  confirmationDetails: void 0
@@ -74006,7 +74341,7 @@ Content from @${displayPath}:
74006
74341
  callId: `client-read-${userMessageTimestamp}`,
74007
74342
  name: readManyFilesTool.displayName,
74008
74343
  description: invocation?.getDescription() ?? "Error attempting to execute tool to read files",
74009
- status: "error" /* Error */,
74344
+ status: CoreToolCallStatus.Error,
74010
74345
  isClientInitiated: true,
74011
74346
  resultDisplay: `Error reading files (${fileLabelsForDisplay.join(", ")}): ${getErrorMessage(error)}`,
74012
74347
  confirmationDetails: void 0
@@ -75468,7 +75803,7 @@ var incrementMaxListeners = (eventEmitter, maxListenersIncrement, signal) => {
75468
75803
  };
75469
75804
 
75470
75805
  // packages/cli/node_modules/execa/lib/ipc/forward.js
75471
- import { EventEmitter as EventEmitter5 } from "node:events";
75806
+ import { EventEmitter as EventEmitter4 } from "node:events";
75472
75807
 
75473
75808
  // packages/cli/node_modules/execa/lib/ipc/incoming.js
75474
75809
  import { once as once2 } from "node:events";
@@ -75550,7 +75885,7 @@ var getIpcEmitter = (anyProcess, channel, isSubprocess) => {
75550
75885
  if (IPC_EMITTERS.has(anyProcess)) {
75551
75886
  return IPC_EMITTERS.get(anyProcess);
75552
75887
  }
75553
- const ipcEmitter = new EventEmitter5();
75888
+ const ipcEmitter = new EventEmitter4();
75554
75889
  ipcEmitter.connected = true;
75555
75890
  IPC_EMITTERS.set(anyProcess, ipcEmitter);
75556
75891
  forwardEvents({
@@ -80245,6 +80580,7 @@ var parseSlashCommand = (query, commands) => {
80245
80580
  let commandToExecute;
80246
80581
  let pathIndex = 0;
80247
80582
  const canonicalPath = [];
80583
+ let parentCommand;
80248
80584
  for (const part of commandPath) {
80249
80585
  let foundCommand = currentCommands.find((cmd) => cmd.name === part);
80250
80586
  if (!foundCommand) {
@@ -80253,6 +80589,7 @@ var parseSlashCommand = (query, commands) => {
80253
80589
  );
80254
80590
  }
80255
80591
  if (foundCommand) {
80592
+ parentCommand = commandToExecute;
80256
80593
  commandToExecute = foundCommand;
80257
80594
  canonicalPath.push(foundCommand.name);
80258
80595
  pathIndex++;
@@ -80266,6 +80603,13 @@ var parseSlashCommand = (query, commands) => {
80266
80603
  }
80267
80604
  }
80268
80605
  const args = parts.slice(pathIndex).join(" ");
80606
+ if (commandToExecute && commandToExecute.takesArgs === false && args.length > 0 && parentCommand && parentCommand.action) {
80607
+ return {
80608
+ commandToExecute: parentCommand,
80609
+ args: parts.slice(pathIndex - 1).join(" "),
80610
+ canonicalPath: canonicalPath.slice(0, -1)
80611
+ };
80612
+ }
80269
80613
  return { commandToExecute, args, canonicalPath };
80270
80614
  };
80271
80615
 
@@ -82209,7 +82553,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
82209
82553
  if (wasRaw) {
82210
82554
  setRawMode?.(true);
82211
82555
  }
82212
- coreEvents.emit("external-editor-closed" /* ExternalEditorClosed */);
82556
+ coreEvents.emit(CoreEvent.ExternalEditorClosed);
82213
82557
  }
82214
82558
  }
82215
82559
 
@@ -84888,7 +85232,7 @@ async function updateExtension(extension, extensionManager, currentState, dispat
84888
85232
  extension.name,
84889
85233
  installMetadata
84890
85234
  );
84891
- if (status === "invalid" /* INVALID */) {
85235
+ if (status === IntegrityDataStatus.INVALID) {
84892
85236
  throw new Error("Extension integrity cannot be verified");
84893
85237
  }
84894
85238
  } catch (e) {
@@ -85262,11 +85606,11 @@ var useSessionBrowser = (config, onLoadHistory) => {
85262
85606
  * Deletes a session by ID using the ChatRecordingService.
85263
85607
  */
85264
85608
  handleDeleteSession: (0, import_react41.useCallback)(
85265
- (session) => {
85609
+ async (session) => {
85266
85610
  try {
85267
85611
  const chatRecordingService = config.getGeminiClient()?.getChatRecordingService();
85268
85612
  if (chatRecordingService) {
85269
- chatRecordingService.deleteSession(session.file);
85613
+ await chatRecordingService.deleteSession(session.file);
85270
85614
  }
85271
85615
  } catch (error) {
85272
85616
  coreEvents.emitFeedback("error", "Error deleting session:", error);
@@ -85725,7 +86069,7 @@ async function initializeApp(config, settings) {
85725
86069
  await ideClient.connect();
85726
86070
  logIdeConnection(
85727
86071
  config,
85728
- new IdeConnectionEvent("start" /* START */)
86072
+ new IdeConnectionEvent(IdeConnectionType.START)
85729
86073
  );
85730
86074
  }).catch((e) => {
85731
86075
  debugLogger.error("Failed to initialize IDE client:", e);
@@ -85743,16 +86087,16 @@ async function initializeApp(config, settings) {
85743
86087
  // packages/cli/src/config/auth.ts
85744
86088
  function validateAuthMethod(authMethod) {
85745
86089
  loadEnvironment(loadSettings().merged, process.cwd());
85746
- if (authMethod === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authMethod === "compute-default-credentials" /* COMPUTE_ADC */) {
86090
+ if (authMethod === AuthType.LOGIN_WITH_GOOGLE || authMethod === AuthType.COMPUTE_ADC) {
85747
86091
  return null;
85748
86092
  }
85749
- if (authMethod === "gemini-api-key" /* USE_GEMINI */) {
86093
+ if (authMethod === AuthType.USE_GEMINI) {
85750
86094
  if (!process.env["GEMINI_API_KEY"]) {
85751
86095
  return "When using Gemini API, you must specify the GEMINI_API_KEY environment variable.\nUpdate your environment and try again (no reload needed if using .env)!";
85752
86096
  }
85753
86097
  return null;
85754
86098
  }
85755
- if (authMethod === "vertex-ai" /* USE_VERTEX_AI */) {
86099
+ if (authMethod === AuthType.USE_VERTEX_AI) {
85756
86100
  const hasVertexProjectLocationConfig = !!process.env["GOOGLE_CLOUD_PROJECT"] && !!process.env["GOOGLE_CLOUD_LOCATION"];
85757
86101
  const hasGoogleApiKey = !!process.env["GOOGLE_API_KEY"];
85758
86102
  if (!hasVertexProjectLocationConfig && !hasGoogleApiKey) {
@@ -87723,7 +88067,7 @@ var authCommand = {
87723
88067
  import process34 from "node:process";
87724
88068
 
87725
88069
  // packages/cli/src/generated/git-commit.ts
87726
- var GIT_COMMIT_INFO = "b6d9970af";
88070
+ var GIT_COMMIT_INFO = "24810f97e";
87727
88071
 
87728
88072
  // packages/cli/src/ui/utils/historyExportUtils.ts
87729
88073
  import * as fsPromises2 from "node:fs/promises";
@@ -87922,6 +88266,7 @@ var listCommand = {
87922
88266
  description: "List saved manual conversation checkpoints",
87923
88267
  kind: "built-in" /* BUILT_IN */,
87924
88268
  autoExecute: true,
88269
+ takesArgs: false,
87925
88270
  action: async (context) => {
87926
88271
  const chatDetails = await getSavedChatTags(context, false);
87927
88272
  const item = {
@@ -88208,10 +88553,18 @@ var chatCommand = {
88208
88553
  description: "Browse auto-saved conversations and manage chat checkpoints",
88209
88554
  kind: "built-in" /* BUILT_IN */,
88210
88555
  autoExecute: true,
88211
- action: async () => ({
88212
- type: "dialog",
88213
- dialog: "sessionBrowser"
88214
- }),
88556
+ action: async (context, args) => {
88557
+ if (args) {
88558
+ const parsed = parseSlashCommand(`/${args}`, chatResumeSubCommands);
88559
+ if (parsed.commandToExecute?.action) {
88560
+ return parsed.commandToExecute.action(context, parsed.args);
88561
+ }
88562
+ }
88563
+ return {
88564
+ type: "dialog",
88565
+ dialog: "sessionBrowser"
88566
+ };
88567
+ },
88215
88568
  subCommands: chatResumeSubCommands
88216
88569
  };
88217
88570
 
@@ -88227,7 +88580,7 @@ var clearCommand = {
88227
88580
  const config = context.services.agentContext?.config;
88228
88581
  const hookSystem = config?.getHookSystem();
88229
88582
  if (hookSystem) {
88230
- await hookSystem.fireSessionEndEvent("clear" /* Clear */);
88583
+ await hookSystem.fireSessionEndEvent(SessionEndReason.Clear);
88231
88584
  }
88232
88585
  config?.injectionService.clear();
88233
88586
  let newSessionId;
@@ -88237,13 +88590,14 @@ var clearCommand = {
88237
88590
  }
88238
88591
  if (geminiClient) {
88239
88592
  context.ui.setDebugMessage("Clearing terminal and resetting chat.");
88593
+ await resetBrowserSession();
88240
88594
  await geminiClient.resetChat();
88241
88595
  } else {
88242
88596
  context.ui.setDebugMessage("Clearing terminal.");
88243
88597
  }
88244
88598
  let result;
88245
88599
  if (hookSystem) {
88246
- result = await hookSystem.fireSessionStartEvent("clear" /* Clear */);
88600
+ result = await hookSystem.fireSessionStartEvent(SessionStartSource.Clear);
88247
88601
  }
88248
88602
  await new Promise((resolve9) => setImmediate(resolve9));
88249
88603
  if (config) {
@@ -89414,7 +89768,9 @@ function ExtensionDetails({
89414
89768
  onBack,
89415
89769
  onInstall,
89416
89770
  onLink,
89417
- isInstalled
89771
+ isInstalled,
89772
+ updateState,
89773
+ onUpdate
89418
89774
  }) {
89419
89775
  const keyMatchers = useKeyMatchers();
89420
89776
  const [consentRequest, setConsentRequest] = (0, import_react55.useState)(null);
@@ -89449,7 +89805,7 @@ function ExtensionDetails({
89449
89805
  );
89450
89806
  return true;
89451
89807
  }
89452
- if (key.name === "l" && isLinkable && !isInstalled && !isInstalling) {
89808
+ if (keyMatchers["extension.link" /* LINK_EXTENSION */](key) && isLinkable && !isInstalled && !isInstalling) {
89453
89809
  setIsInstalling(true);
89454
89810
  void onLink(
89455
89811
  (prompt) => new Promise((resolve9) => {
@@ -89458,6 +89814,10 @@ function ExtensionDetails({
89458
89814
  );
89459
89815
  return true;
89460
89816
  }
89817
+ if (keyMatchers["extension.update" /* UPDATE_EXTENSION */](key) && updateState === "update available" /* UPDATE_AVAILABLE */ && !isInstalling) {
89818
+ void onUpdate?.();
89819
+ return true;
89820
+ }
89461
89821
  return false;
89462
89822
  },
89463
89823
  { isActive: true, priority: true }
@@ -89521,7 +89881,9 @@ function ExtensionDetails({
89521
89881
  ">",
89522
89882
  " "
89523
89883
  ] }),
89524
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.text.primary, bold: true, children: extension.extensionName })
89884
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.text.primary, bold: true, children: extension.extensionName }),
89885
+ updateState === "update available" /* UPDATE_AVAILABLE */ && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { marginLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.warning, children: "[I] Update" }) }),
89886
+ updateState === "updating" /* UPDATING */ && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { marginLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.text.secondary, children: "[Updating...]" }) })
89525
89887
  ] }),
89526
89888
  /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "row", children: [
89527
89889
  /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Text, { color: theme.text.secondary, children: [
@@ -89602,7 +89964,7 @@ function ExtensionDetails({
89602
89964
  ]
89603
89965
  }
89604
89966
  ),
89605
- isInstalled && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexDirection: "row", marginTop: 1, justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.success, children: "Already Installed" }) })
89967
+ isInstalled && updateState !== "updating" /* UPDATING */ && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexDirection: "row", marginTop: 1, justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.success, children: "Already Installed" }) })
89606
89968
  ]
89607
89969
  }
89608
89970
  );
@@ -89621,11 +89983,11 @@ function ExtensionRegistryView({
89621
89983
  "",
89622
89984
  config.getExtensionRegistryURI()
89623
89985
  );
89624
- const { terminalHeight, staticExtraHeight } = useUIState();
89986
+ const { terminalHeight, staticExtraHeight, historyManager } = useUIState();
89625
89987
  const [selectedExtension, setSelectedExtension] = (0, import_react56.useState)(null);
89626
- const { extensionsUpdateState } = useExtensionUpdates(
89988
+ const { extensionsUpdateState, dispatchExtensionStateUpdate } = useExtensionUpdates(
89627
89989
  extensionManager,
89628
- () => 0,
89990
+ historyManager.addItem,
89629
89991
  config.getEnableExtensionReloading()
89630
89992
  );
89631
89993
  const [installedExtensions, setInstalledExtensions] = (0, import_react56.useState)(
@@ -89662,6 +90024,21 @@ function ExtensionRegistryView({
89662
90024
  },
89663
90025
  [onLink, extensionManager]
89664
90026
  );
90027
+ const handleUpdate = (0, import_react56.useCallback)(
90028
+ async (extension) => {
90029
+ dispatchExtensionStateUpdate({
90030
+ type: "SCHEDULE_UPDATE",
90031
+ payload: {
90032
+ all: false,
90033
+ names: [extension.extensionName],
90034
+ onComplete: () => {
90035
+ setInstalledExtensions(extensionManager.getExtensions());
90036
+ }
90037
+ }
90038
+ });
90039
+ },
90040
+ [dispatchExtensionStateUpdate, extensionManager]
90041
+ );
89665
90042
  const renderItem = (0, import_react56.useCallback)(
89666
90043
  (item, isActive, _labelWidth) => {
89667
90044
  const isInstalled = installedExtensions.some(
@@ -89670,7 +90047,6 @@ function ExtensionRegistryView({
89670
90047
  const updateState = extensionsUpdateState.get(
89671
90048
  item.extension.extensionName
89672
90049
  );
89673
- const hasUpdate = updateState === "update available" /* UPDATE_AVAILABLE */;
89674
90050
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Box_default, { flexDirection: "row", width: "100%", justifyContent: "space-between", children: [
89675
90051
  /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Box_default, { flexDirection: "row", flexShrink: 1, minWidth: 0, children: [
89676
90052
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { width: 2, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
@@ -89689,8 +90065,7 @@ function ExtensionRegistryView({
89689
90065
  }
89690
90066
  ) }),
89691
90067
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { flexShrink: 0, marginX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { color: theme.text.secondary, children: "|" }) }),
89692
- isInstalled && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { marginRight: 1, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { color: theme.status.success, children: "[Installed]" }) }),
89693
- hasUpdate && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { marginRight: 1, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { color: theme.status.warning, children: "[Update available]" }) }),
90068
+ updateState === "update available" /* UPDATE_AVAILABLE */ ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { marginRight: 1, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { color: theme.status.warning, children: "[Update available]" }) }) : updateState === "updating" /* UPDATING */ ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { marginRight: 1, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { color: theme.text.secondary, children: "[Updating...]" }) }) : isInstalled && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { marginRight: 1, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { color: theme.status.success, children: "[Installed]" }) }),
89694
90069
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { flexShrink: 1, minWidth: 0, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: item.description }) })
89695
90070
  ] }),
89696
90071
  /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Box_default, { flexShrink: 0, marginLeft: 2, width: 8, flexDirection: "row", children: [
@@ -89790,7 +90165,13 @@ function ExtensionRegistryView({
89790
90165
  },
89791
90166
  isInstalled: installedExtensions.some(
89792
90167
  (e) => e.name === selectedExtension.extensionName
89793
- )
90168
+ ),
90169
+ updateState: extensionsUpdateState.get(
90170
+ selectedExtension.extensionName
90171
+ ),
90172
+ onUpdate: async () => {
90173
+ await handleUpdate(selectedExtension);
90174
+ }
89794
90175
  }
89795
90176
  )
89796
90177
  ] });
@@ -90405,6 +90786,7 @@ var listExtensionsCommand = {
90405
90786
  description: "List active extensions",
90406
90787
  kind: "built-in" /* BUILT_IN */,
90407
90788
  autoExecute: true,
90789
+ takesArgs: false,
90408
90790
  action: listAction2
90409
90791
  };
90410
90792
  var updateExtensionsCommand = {
@@ -90458,6 +90840,7 @@ var exploreExtensionsCommand = {
90458
90840
  description: "Open extensions page in your browser",
90459
90841
  kind: "built-in" /* BUILT_IN */,
90460
90842
  autoExecute: true,
90843
+ takesArgs: false,
90461
90844
  action: exploreAction
90462
90845
  };
90463
90846
  var reloadCommand = {
@@ -90485,26 +90868,35 @@ function extensionsCommand(enableExtensionReloading) {
90485
90868
  linkCommand,
90486
90869
  configCommand2
90487
90870
  ] : [];
90871
+ const subCommands = [
90872
+ listExtensionsCommand,
90873
+ updateExtensionsCommand,
90874
+ exploreExtensionsCommand,
90875
+ reloadCommand,
90876
+ ...conditionalCommands
90877
+ ];
90488
90878
  return {
90489
90879
  name: "extensions",
90490
90880
  description: "Manage extensions",
90491
90881
  kind: "built-in" /* BUILT_IN */,
90492
90882
  autoExecute: false,
90493
- subCommands: [
90494
- listExtensionsCommand,
90495
- updateExtensionsCommand,
90496
- exploreExtensionsCommand,
90497
- reloadCommand,
90498
- ...conditionalCommands
90499
- ],
90500
- action: (context, args) => (
90501
- // Default to list if no subcommand is provided
90502
- listExtensionsCommand.action(context, args)
90503
- )
90883
+ subCommands,
90884
+ action: async (context, args) => {
90885
+ if (args) {
90886
+ const parsed = parseSlashCommand(`/${args}`, subCommands);
90887
+ if (parsed.commandToExecute?.action) {
90888
+ return parsed.commandToExecute.action(context, parsed.args);
90889
+ }
90890
+ }
90891
+ return listExtensionsCommand.action(context, args);
90892
+ }
90504
90893
  };
90505
90894
  }
90506
90895
 
90507
90896
  // packages/cli/src/ui/components/FooterConfigDialog.tsx
90897
+ var import_react60 = __toESM(require_react(), 1);
90898
+
90899
+ // packages/cli/src/ui/components/Footer.tsx
90508
90900
  var import_react59 = __toESM(require_react(), 1);
90509
90901
 
90510
90902
  // packages/cli/src/ui/components/ConsoleSummaryDisplay.tsx
@@ -90534,12 +90926,13 @@ import process38 from "node:process";
90534
90926
  var import_react58 = __toESM(require_react(), 1);
90535
90927
  import process37 from "node:process";
90536
90928
  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
90537
- var MemoryUsageDisplay = ({
90538
- color = theme.text.primary
90539
- }) => {
90929
+ var MemoryUsageDisplay = ({ color = theme.text.primary, isActive = true }) => {
90540
90930
  const [memoryUsage, setMemoryUsage] = (0, import_react58.useState)("");
90541
90931
  const [memoryUsageColor, setMemoryUsageColor] = (0, import_react58.useState)(color);
90542
90932
  (0, import_react58.useEffect)(() => {
90933
+ if (!isActive) {
90934
+ return;
90935
+ }
90543
90936
  const updateMemory = () => {
90544
90937
  const usage = process37.memoryUsage().rss;
90545
90938
  setMemoryUsage(formatBytes(usage));
@@ -90550,7 +90943,7 @@ var MemoryUsageDisplay = ({
90550
90943
  const intervalId = setInterval(updateMemory, 2e3);
90551
90944
  updateMemory();
90552
90945
  return () => clearInterval(intervalId);
90553
- }, [color]);
90946
+ }, [color, isActive]);
90554
90947
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { color: memoryUsageColor, children: memoryUsage }) });
90555
90948
  };
90556
90949
 
@@ -90700,6 +91093,11 @@ var ALL_ITEMS = [
90700
91093
  header: "session",
90701
91094
  description: "Unique identifier for the current session"
90702
91095
  },
91096
+ {
91097
+ id: "auth",
91098
+ header: "/auth",
91099
+ description: "Current authentication info"
91100
+ },
90703
91101
  {
90704
91102
  id: "code-changes",
90705
91103
  header: "diff",
@@ -90720,6 +91118,7 @@ var DEFAULT_ORDER = [
90720
91118
  "quota",
90721
91119
  "memory-usage",
90722
91120
  "session-id",
91121
+ "auth",
90723
91122
  "code-changes",
90724
91123
  "token-count"
90725
91124
  ];
@@ -90753,8 +91152,12 @@ function deriveItemsFromLegacySettings(settings) {
90753
91152
  }
90754
91153
  var VALID_IDS = new Set(ALL_ITEMS.map((i) => i.id));
90755
91154
  function resolveFooterState(settings) {
90756
- const source = (settings.ui?.footer?.items ?? deriveItemsFromLegacySettings(settings)).filter((id) => VALID_IDS.has(id));
90757
- const others = DEFAULT_ORDER.filter((id) => !source.includes(id));
91155
+ const showUserIdentity = settings.ui?.showUserIdentity !== false;
91156
+ const filteredValidIds = showUserIdentity ? VALID_IDS : new Set([...VALID_IDS].filter((id) => id !== "auth"));
91157
+ const source = (settings.ui?.footer?.items ?? deriveItemsFromLegacySettings(settings)).filter((id) => filteredValidIds.has(id));
91158
+ const others = DEFAULT_ORDER.filter(
91159
+ (id) => !source.includes(id) && filteredValidIds.has(id)
91160
+ );
90758
91161
  return {
90759
91162
  orderedIds: [...source, ...others],
90760
91163
  selectedIds: new Set(source)
@@ -90857,11 +91260,26 @@ var FooterRow = ({ items, showLabels }) => {
90857
91260
  function isFooterItemId(id) {
90858
91261
  return ALL_ITEMS.some((i) => i.id === id);
90859
91262
  }
90860
- var Footer = () => {
91263
+ var Footer = ({
91264
+ copyModeEnabled = false
91265
+ }) => {
90861
91266
  const uiState = useUIState();
90862
91267
  const config = useConfig();
90863
91268
  const settings = useSettings();
90864
91269
  const { vimEnabled, vimMode } = useVimMode();
91270
+ const authType = config.getContentGeneratorConfig()?.authType;
91271
+ const [email, setEmail] = (0, import_react59.useState)();
91272
+ (0, import_react59.useEffect)(() => {
91273
+ if (authType) {
91274
+ const userAccountManager = new UserAccountManager();
91275
+ setEmail(userAccountManager.getCachedGoogleAccount() ?? void 0);
91276
+ } else {
91277
+ setEmail(void 0);
91278
+ }
91279
+ }, [authType]);
91280
+ if (copyModeEnabled) {
91281
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { height: 1 });
91282
+ }
90865
91283
  const {
90866
91284
  model,
90867
91285
  targetDir,
@@ -91019,7 +91437,18 @@ var Footer = () => {
91019
91437
  break;
91020
91438
  }
91021
91439
  case "memory-usage": {
91022
- addCol(id, header, () => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MemoryUsageDisplay, { color: itemColor }), 10);
91440
+ addCol(
91441
+ id,
91442
+ header,
91443
+ () => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
91444
+ MemoryUsageDisplay,
91445
+ {
91446
+ color: itemColor,
91447
+ isActive: !uiState.copyModeEnabled
91448
+ }
91449
+ ),
91450
+ 10
91451
+ );
91023
91452
  break;
91024
91453
  }
91025
91454
  case "session-id": {
@@ -91031,6 +91460,18 @@ var Footer = () => {
91031
91460
  );
91032
91461
  break;
91033
91462
  }
91463
+ case "auth": {
91464
+ if (!settings.merged.ui.showUserIdentity) break;
91465
+ if (!authType) break;
91466
+ const displayStr = authType === AuthType.LOGIN_WITH_GOOGLE ? email ?? "google" : authType;
91467
+ addCol(
91468
+ id,
91469
+ header,
91470
+ () => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: itemColor, wrap: "truncate-end", children: displayStr }),
91471
+ displayStr.length
91472
+ );
91473
+ break;
91474
+ }
91034
91475
  case "code-changes": {
91035
91476
  const added = uiState.sessionStats.metrics.files.totalLinesAdded;
91036
91477
  const removed = uiState.sessionStats.metrics.files.totalLinesRemoved;
@@ -91178,14 +91619,14 @@ var FooterConfigDialog = ({
91178
91619
  const keyMatchers = useKeyMatchers();
91179
91620
  const { settings, setSetting } = useSettingsStore();
91180
91621
  const { constrainHeight, terminalHeight, staticExtraHeight } = useUIState();
91181
- const [state, dispatch] = (0, import_react59.useReducer)(
91622
+ const [state, dispatch] = (0, import_react60.useReducer)(
91182
91623
  footerConfigReducer,
91183
91624
  void 0,
91184
91625
  () => resolveFooterState(settings.merged)
91185
91626
  );
91186
91627
  const { orderedIds, selectedIds } = state;
91187
- const [focusKey, setFocusKey] = (0, import_react59.useState)(orderedIds[0]);
91188
- const listItems = (0, import_react59.useMemo)(() => {
91628
+ const [focusKey, setFocusKey] = (0, import_react60.useState)(orderedIds[0]);
91629
+ const listItems = (0, import_react60.useMemo)(() => {
91189
91630
  const items = orderedIds.map((id) => {
91190
91631
  const item = ALL_ITEMS.find((i) => i.id === id);
91191
91632
  if (!item) return null;
@@ -91220,7 +91661,7 @@ var FooterConfigDialog = ({
91220
91661
  });
91221
91662
  return items;
91222
91663
  }, [orderedIds]);
91223
- const handleSaveAndClose = (0, import_react59.useCallback)(() => {
91664
+ const handleSaveAndClose = (0, import_react60.useCallback)(() => {
91224
91665
  const finalItems = orderedIds.filter((id) => selectedIds.has(id));
91225
91666
  const currentSetting = settings.merged.ui?.footer?.items;
91226
91667
  if (JSON.stringify(finalItems) !== JSON.stringify(currentSetting)) {
@@ -91234,17 +91675,17 @@ var FooterConfigDialog = ({
91234
91675
  settings.merged.ui?.footer?.items,
91235
91676
  onClose
91236
91677
  ]);
91237
- const handleResetToDefaults = (0, import_react59.useCallback)(() => {
91678
+ const handleResetToDefaults = (0, import_react60.useCallback)(() => {
91238
91679
  setSetting("User" /* User */, "ui.footer.items", void 0);
91239
91680
  const newState = resolveFooterState(settings.merged);
91240
91681
  dispatch({ type: "SET_STATE", payload: newState });
91241
91682
  setFocusKey(newState.orderedIds[0]);
91242
91683
  }, [setSetting, settings.merged]);
91243
- const handleToggleLabels = (0, import_react59.useCallback)(() => {
91684
+ const handleToggleLabels = (0, import_react60.useCallback)(() => {
91244
91685
  const current = settings.merged.ui.footer.showLabels !== false;
91245
91686
  setSetting("User" /* User */, "ui.footer.showLabels", !current);
91246
91687
  }, [setSetting, settings.merged.ui.footer.showLabels]);
91247
- const handleSelect = (0, import_react59.useCallback)(
91688
+ const handleSelect = (0, import_react60.useCallback)(
91248
91689
  (item) => {
91249
91690
  if (item.type === "config") {
91250
91691
  dispatch({ type: "TOGGLE_ITEM", id: item.id });
@@ -91256,7 +91697,7 @@ var FooterConfigDialog = ({
91256
91697
  },
91257
91698
  [handleResetToDefaults, handleToggleLabels]
91258
91699
  );
91259
- const handleHighlight = (0, import_react59.useCallback)((item) => {
91700
+ const handleHighlight = (0, import_react60.useCallback)((item) => {
91260
91701
  setFocusKey(item.key);
91261
91702
  }, []);
91262
91703
  useKeypress(
@@ -91282,7 +91723,7 @@ var FooterConfigDialog = ({
91282
91723
  { isActive: true, priority: true }
91283
91724
  );
91284
91725
  const showLabels = settings.merged.ui.footer.showLabels !== false;
91285
- const previewContent = (0, import_react59.useMemo)(() => {
91726
+ const previewContent = (0, import_react60.useMemo)(() => {
91286
91727
  if (focusKey === "reset") {
91287
91728
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: theme.ui.comment, italic: true, children: "Default footer (uses legacy settings)" });
91288
91729
  }
@@ -91306,6 +91747,7 @@ var FooterConfigDialog = ({
91306
91747
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: getColor("code-changes"), children: " " }),
91307
91748
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: getColor("code-changes", theme.status.error), children: "-4" })
91308
91749
  ] }),
91750
+ auth: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: getColor("auth", itemColor), children: "test@example.com" }),
91309
91751
  "token-count": /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: getColor("token-count", itemColor), children: "1.5k tokens" })
91310
91752
  };
91311
91753
  const rowItems = itemsToPreview.filter((id) => mockData[id]).map((id) => ({
@@ -91463,10 +91905,10 @@ var shortcutsCommand = {
91463
91905
  };
91464
91906
 
91465
91907
  // packages/cli/src/ui/components/RewindViewer.tsx
91466
- var import_react62 = __toESM(require_react(), 1);
91908
+ var import_react63 = __toESM(require_react(), 1);
91467
91909
 
91468
91910
  // packages/cli/src/ui/hooks/useRewind.ts
91469
- var import_react60 = __toESM(require_react(), 1);
91911
+ var import_react61 = __toESM(require_react(), 1);
91470
91912
 
91471
91913
  // packages/cli/src/ui/utils/rewindFileOps.ts
91472
91914
  import fs38 from "node:fs/promises";
@@ -91619,15 +92061,15 @@ async function revertFileChanges(conversation, targetMessageId) {
91619
92061
 
91620
92062
  // packages/cli/src/ui/hooks/useRewind.ts
91621
92063
  function useRewind(conversation) {
91622
- const [selectedMessageId, setSelectedMessageId] = (0, import_react60.useState)(
92064
+ const [selectedMessageId, setSelectedMessageId] = (0, import_react61.useState)(
91623
92065
  null
91624
92066
  );
91625
- const [confirmationStats, setConfirmationStats] = (0, import_react60.useState)(null);
91626
- const getStats = (0, import_react60.useCallback)(
92067
+ const [confirmationStats, setConfirmationStats] = (0, import_react61.useState)(null);
92068
+ const getStats = (0, import_react61.useCallback)(
91627
92069
  (userMessage) => calculateTurnStats(conversation, userMessage),
91628
92070
  [conversation]
91629
92071
  );
91630
- const selectMessage = (0, import_react60.useCallback)(
92072
+ const selectMessage = (0, import_react61.useCallback)(
91631
92073
  (messageId) => {
91632
92074
  const msg = conversation.messages.find((m2) => m2.id === messageId);
91633
92075
  if (msg) {
@@ -91637,7 +92079,7 @@ function useRewind(conversation) {
91637
92079
  },
91638
92080
  [conversation]
91639
92081
  );
91640
- const clearSelection = (0, import_react60.useCallback)(() => {
92082
+ const clearSelection = (0, import_react61.useCallback)(() => {
91641
92083
  setSelectedMessageId(null);
91642
92084
  setConfirmationStats(null);
91643
92085
  }, []);
@@ -91651,7 +92093,7 @@ function useRewind(conversation) {
91651
92093
  }
91652
92094
 
91653
92095
  // packages/cli/src/ui/components/RewindConfirmation.tsx
91654
- var import_react61 = __toESM(require_react(), 1);
92096
+ var import_react62 = __toESM(require_react(), 1);
91655
92097
  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
91656
92098
  var REWIND_OPTIONS = [
91657
92099
  {
@@ -91696,7 +92138,7 @@ var RewindConfirmation = ({
91696
92138
  const handleSelect = (outcome) => {
91697
92139
  onConfirm(outcome);
91698
92140
  };
91699
- const options = (0, import_react61.useMemo)(() => {
92141
+ const options = (0, import_react62.useMemo)(() => {
91700
92142
  if (stats) {
91701
92143
  return REWIND_OPTIONS;
91702
92144
  }
@@ -91823,7 +92265,7 @@ var RewindViewer = ({
91823
92265
  onRewind
91824
92266
  }) => {
91825
92267
  const keyMatchers = useKeyMatchers();
91826
- const [isRewinding, setIsRewinding] = (0, import_react62.useState)(false);
92268
+ const [isRewinding, setIsRewinding] = (0, import_react63.useState)(false);
91827
92269
  const { terminalWidth, terminalHeight } = useUIState();
91828
92270
  const isScreenReaderEnabled = use_is_screen_reader_enabled_default();
91829
92271
  const {
@@ -91833,15 +92275,15 @@ var RewindViewer = ({
91833
92275
  selectMessage,
91834
92276
  clearSelection
91835
92277
  } = useRewind(conversation);
91836
- const [highlightedMessageId, setHighlightedMessageId] = (0, import_react62.useState)(null);
91837
- const [expandedMessageId, setExpandedMessageId] = (0, import_react62.useState)(
92278
+ const [highlightedMessageId, setHighlightedMessageId] = (0, import_react63.useState)(null);
92279
+ const [expandedMessageId, setExpandedMessageId] = (0, import_react63.useState)(
91838
92280
  null
91839
92281
  );
91840
- const interactions = (0, import_react62.useMemo)(
92282
+ const interactions = (0, import_react63.useMemo)(
91841
92283
  () => conversation.messages.filter((msg) => msg.type === "user"),
91842
92284
  [conversation.messages]
91843
92285
  );
91844
- const items = (0, import_react62.useMemo)(() => {
92286
+ const items = (0, import_react63.useMemo)(() => {
91845
92287
  const interactionItems = interactions.map((msg, idx) => ({
91846
92288
  key: `${msg.id || "msg"}-${idx}`,
91847
92289
  value: msg,
@@ -92197,7 +92639,7 @@ var rewindCommand = {
92197
92639
  };
92198
92640
 
92199
92641
  // packages/cli/src/ui/commands/hooksCommand.ts
92200
- var import_react64 = __toESM(require_react(), 1);
92642
+ var import_react65 = __toESM(require_react(), 1);
92201
92643
 
92202
92644
  // packages/cli/src/utils/hookSettings.ts
92203
92645
  function enableHook(settings, hookName) {
@@ -92335,7 +92777,7 @@ function renderHookActionFeedback(result, formatScope) {
92335
92777
  }
92336
92778
 
92337
92779
  // packages/cli/src/ui/components/HooksDialog.tsx
92338
- var import_react63 = __toESM(require_react(), 1);
92780
+ var import_react64 = __toESM(require_react(), 1);
92339
92781
  var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
92340
92782
  var DEFAULT_MAX_VISIBLE_HOOKS = 8;
92341
92783
  var HooksDialog = ({
@@ -92344,8 +92786,8 @@ var HooksDialog = ({
92344
92786
  maxVisibleHooks = DEFAULT_MAX_VISIBLE_HOOKS
92345
92787
  }) => {
92346
92788
  const keyMatchers = useKeyMatchers();
92347
- const [scrollOffset, setScrollOffset] = (0, import_react63.useState)(0);
92348
- const flattenedHooks = (0, import_react63.useMemo)(() => {
92789
+ const [scrollOffset, setScrollOffset] = (0, import_react64.useState)(0);
92790
+ const flattenedHooks = (0, import_react64.useMemo)(() => {
92349
92791
  const result = [];
92350
92792
  const hooksByEvent = hooks.reduce(
92351
92793
  (acc, hook) => {
@@ -92489,7 +92931,7 @@ function panelAction(context) {
92489
92931
  const allHooks = hookSystem?.getAllHooks() || [];
92490
92932
  return {
92491
92933
  type: "custom_dialog",
92492
- component: (0, import_react64.createElement)(HooksDialog, {
92934
+ component: (0, import_react65.createElement)(HooksDialog, {
92493
92935
  hooks: allHooks,
92494
92936
  onClose: () => context.ui.removeComponent()
92495
92937
  })
@@ -92773,12 +93215,12 @@ import path34 from "node:path";
92773
93215
  function getIdeStatusMessage(ideClient) {
92774
93216
  const connection = ideClient.getConnectionStatus();
92775
93217
  switch (connection.status) {
92776
- case "connected" /* Connected */:
93218
+ case IDEConnectionStatus.Connected:
92777
93219
  return {
92778
93220
  messageType: "info",
92779
93221
  content: `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`
92780
93222
  };
92781
- case "connecting" /* Connecting */:
93223
+ case IDEConnectionStatus.Connecting:
92782
93224
  return {
92783
93225
  messageType: "info",
92784
93226
  content: `\u{1F7E1} Connecting...`
@@ -92819,7 +93261,7 @@ ${infoMessage}`;
92819
93261
  async function getIdeStatusMessageWithFiles(ideClient) {
92820
93262
  const connection = ideClient.getConnectionStatus();
92821
93263
  switch (connection.status) {
92822
- case "connected" /* Connected */: {
93264
+ case IDEConnectionStatus.Connected: {
92823
93265
  let content = `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`;
92824
93266
  const context = ideContextStore.get();
92825
93267
  const openFiles = context?.workspaceState?.openFiles;
@@ -92831,7 +93273,7 @@ async function getIdeStatusMessageWithFiles(ideClient) {
92831
93273
  content
92832
93274
  };
92833
93275
  }
92834
- case "connecting" /* Connecting */:
93276
+ case IDEConnectionStatus.Connecting:
92835
93277
  return {
92836
93278
  messageType: "info",
92837
93279
  content: `\u{1F7E1} Connecting...`
@@ -92853,7 +93295,7 @@ async function setIdeModeAndSyncConnection(config, value, options = {}) {
92853
93295
  const ideClient = await IdeClient.getInstance();
92854
93296
  if (value) {
92855
93297
  await ideClient.connect(options);
92856
- logIdeConnection(config, new IdeConnectionEvent("session" /* SESSION */));
93298
+ logIdeConnection(config, new IdeConnectionEvent(IdeConnectionType.SESSION));
92857
93299
  } else {
92858
93300
  await ideClient.disconnect();
92859
93301
  }
@@ -92941,7 +93383,7 @@ var ideCommand = async () => {
92941
93383
  logToConsole: false
92942
93384
  }
92943
93385
  );
92944
- if (ideClient.getConnectionStatus().status === "connected" /* Connected */) {
93386
+ if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
92945
93387
  break;
92946
93388
  }
92947
93389
  await new Promise((resolve9) => setTimeout(resolve9, 500));
@@ -93018,7 +93460,7 @@ var ideCommand = async () => {
93018
93460
  }
93019
93461
  };
93020
93462
  const { status } = ideClient.getConnectionStatus();
93021
- const isConnected2 = status === "connected" /* Connected */;
93463
+ const isConnected2 = status === IDEConnectionStatus.Connected;
93022
93464
  if (isConnected2) {
93023
93465
  ideSlashCommand.subCommands = [statusCommand, disableCommand5];
93024
93466
  } else {
@@ -93118,13 +93560,13 @@ Use /mcp auth <server-name> to authenticate.`
93118
93560
  const displayListener = (message) => {
93119
93561
  context.ui.addItem({ type: "info", text: message });
93120
93562
  };
93121
- coreEvents.on("oauth-display-message" /* OauthDisplayMessage */, displayListener);
93563
+ coreEvents.on(CoreEvent.OauthDisplayMessage, displayListener);
93122
93564
  try {
93123
93565
  context.ui.addItem({
93124
93566
  type: "info",
93125
93567
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
93126
93568
  });
93127
- const { MCPOAuthProvider } = await import("./core-BMLL5RF4.js");
93569
+ const { MCPOAuthProvider } = await import("./dist-4FKFY6XB.js");
93128
93570
  let oauthConfig = server.oauth;
93129
93571
  if (!oauthConfig) {
93130
93572
  oauthConfig = { enabled: false };
@@ -93161,7 +93603,7 @@ Use /mcp auth <server-name> to authenticate.`
93161
93603
  content: `Failed to authenticate with MCP server '${serverName}': ${getErrorMessage(error)}`
93162
93604
  };
93163
93605
  } finally {
93164
- coreEvents.removeListener("oauth-display-message" /* OauthDisplayMessage */, displayListener);
93606
+ coreEvents.removeListener(CoreEvent.OauthDisplayMessage, displayListener);
93165
93607
  }
93166
93608
  },
93167
93609
  completion: async (context, partialArg) => {
@@ -93174,7 +93616,7 @@ Use /mcp auth <server-name> to authenticate.`
93174
93616
  );
93175
93617
  }
93176
93618
  };
93177
- var listAction3 = async (context, showDescriptions = false, showSchema = false) => {
93619
+ var listAction3 = async (context, showDescriptions = false, showSchema = false, serverNameFilter) => {
93178
93620
  const agentContext = context.services.agentContext;
93179
93621
  const config = agentContext?.config;
93180
93622
  if (!config) {
@@ -93193,14 +93635,24 @@ var listAction3 = async (context, showDescriptions = false, showSchema = false)
93193
93635
  content: "Could not retrieve tool registry."
93194
93636
  };
93195
93637
  }
93196
- const mcpServers = config.getMcpClientManager()?.getMcpServers() || {};
93197
- const serverNames = Object.keys(mcpServers);
93638
+ let mcpServers = config.getMcpClientManager()?.getMcpServers() || {};
93198
93639
  const blockedMcpServers = config.getMcpClientManager()?.getBlockedMcpServers() || [];
93640
+ if (serverNameFilter) {
93641
+ const filter = serverNameFilter.trim().toLowerCase();
93642
+ if (filter) {
93643
+ mcpServers = Object.fromEntries(
93644
+ Object.entries(mcpServers).filter(
93645
+ ([name]) => name.toLowerCase().includes(filter) || normalizeServerId(name).includes(filter)
93646
+ )
93647
+ );
93648
+ }
93649
+ }
93650
+ const serverNames = Object.keys(mcpServers);
93199
93651
  const connectingServers = serverNames.filter(
93200
- (name) => getMCPServerStatus(name) === "connecting" /* CONNECTING */
93652
+ (name) => getMCPServerStatus(name) === MCPServerStatus.CONNECTING
93201
93653
  );
93202
93654
  const discoveryState = getMCPDiscoveryState();
93203
- const discoveryInProgress = discoveryState === "in_progress" /* IN_PROGRESS */ || connectingServers.length > 0;
93655
+ const discoveryInProgress = discoveryState === MCPDiscoveryState.IN_PROGRESS || connectingServers.length > 0;
93204
93656
  const allTools = toolRegistry.getAllTools();
93205
93657
  const mcpTools = allTools.filter((tool) => tool instanceof DiscoveredMCPTool);
93206
93658
  const promptRegistry = config.getPromptRegistry();
@@ -93281,7 +93733,7 @@ var listCommand2 = {
93281
93733
  description: "List configured MCP servers and tools",
93282
93734
  kind: "built-in" /* BUILT_IN */,
93283
93735
  autoExecute: true,
93284
- action: (context) => listAction3(context)
93736
+ action: (context, args) => listAction3(context, false, false, args)
93285
93737
  };
93286
93738
  var descCommand = {
93287
93739
  name: "desc",
@@ -93289,14 +93741,14 @@ var descCommand = {
93289
93741
  description: "List configured MCP servers and tools with descriptions",
93290
93742
  kind: "built-in" /* BUILT_IN */,
93291
93743
  autoExecute: true,
93292
- action: (context) => listAction3(context, true)
93744
+ action: (context, args) => listAction3(context, true, false, args)
93293
93745
  };
93294
93746
  var schemaCommand = {
93295
93747
  name: "schema",
93296
93748
  description: "List configured MCP servers and tools with descriptions and schemas",
93297
93749
  kind: "built-in" /* BUILT_IN */,
93298
93750
  autoExecute: true,
93299
- action: (context) => listAction3(context, true, true)
93751
+ action: (context, args) => listAction3(context, true, true, args)
93300
93752
  };
93301
93753
  var reloadCommand2 = {
93302
93754
  name: "reload",
@@ -93304,6 +93756,7 @@ var reloadCommand2 = {
93304
93756
  description: "Reloads MCP servers",
93305
93757
  kind: "built-in" /* BUILT_IN */,
93306
93758
  autoExecute: true,
93759
+ takesArgs: false,
93307
93760
  action: async (context) => {
93308
93761
  const agentContext = context.services.agentContext;
93309
93762
  const config = agentContext?.config;
@@ -93464,7 +93917,16 @@ var mcpCommand = {
93464
93917
  enableCommand4,
93465
93918
  disableCommand4
93466
93919
  ],
93467
- action: async (context) => listAction3(context)
93920
+ action: async (context, args) => {
93921
+ if (args) {
93922
+ const parsed = parseSlashCommand(`/${args}`, mcpCommand.subCommands);
93923
+ if (parsed.commandToExecute?.action) {
93924
+ return parsed.commandToExecute.action(context, parsed.args);
93925
+ }
93926
+ return listAction3(context, false, false, args);
93927
+ }
93928
+ return listAction3(context);
93929
+ }
93468
93930
  };
93469
93931
 
93470
93932
  // packages/cli/src/ui/commands/memoryCommand.ts
@@ -93624,7 +94086,7 @@ var modelCommand = {
93624
94086
  };
93625
94087
 
93626
94088
  // packages/cli/src/ui/components/triage/TriageDuplicates.tsx
93627
- var import_react65 = __toESM(require_react(), 1);
94089
+ var import_react66 = __toESM(require_react(), 1);
93628
94090
  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
93629
94091
  var VISIBLE_LINES_COLLAPSED = 6;
93630
94092
  var VISIBLE_LINES_EXPANDED = 20;
@@ -93650,7 +94112,7 @@ var TriageDuplicates = ({
93650
94112
  initialLimit = 50
93651
94113
  }) => {
93652
94114
  const keyMatchers = useKeyMatchers();
93653
- const [state, setState] = (0, import_react65.useState)({
94115
+ const [state, setState] = (0, import_react66.useState)({
93654
94116
  status: "loading",
93655
94117
  issues: [],
93656
94118
  currentIndex: 0,
@@ -93658,18 +94120,18 @@ var TriageDuplicates = ({
93658
94120
  analyzingIds: /* @__PURE__ */ new Set(),
93659
94121
  message: "Fetching issues..."
93660
94122
  });
93661
- const [focusSection, setFocusSection] = (0, import_react65.useState)("target");
93662
- const [selectedCandidateIndex, setSelectedCandidateIndex] = (0, import_react65.useState)(0);
93663
- const [targetExpanded, setTargetExpanded] = (0, import_react65.useState)(false);
93664
- const [targetScrollOffset, setTargetScrollOffset] = (0, import_react65.useState)(0);
93665
- const [candidateScrollOffset, setCandidateScrollOffset] = (0, import_react65.useState)(0);
93666
- const [inputAction, setInputAction] = (0, import_react65.useState)("");
93667
- const [processedHistory, setProcessedHistory] = (0, import_react65.useState)(
94123
+ const [focusSection, setFocusSection] = (0, import_react66.useState)("target");
94124
+ const [selectedCandidateIndex, setSelectedCandidateIndex] = (0, import_react66.useState)(0);
94125
+ const [targetExpanded, setTargetExpanded] = (0, import_react66.useState)(false);
94126
+ const [targetScrollOffset, setTargetScrollOffset] = (0, import_react66.useState)(0);
94127
+ const [candidateScrollOffset, setCandidateScrollOffset] = (0, import_react66.useState)(0);
94128
+ const [inputAction, setInputAction] = (0, import_react66.useState)("");
94129
+ const [processedHistory, setProcessedHistory] = (0, import_react66.useState)(
93668
94130
  []
93669
94131
  );
93670
- const [showHistory, setShowHistory] = (0, import_react65.useState)(false);
93671
- const [candidateListScrollOffset, setCandidateListScrollOffset] = (0, import_react65.useState)(0);
93672
- (0, import_react65.useEffect)(() => {
94132
+ const [showHistory, setShowHistory] = (0, import_react66.useState)(false);
94133
+ const [candidateListScrollOffset, setCandidateListScrollOffset] = (0, import_react66.useState)(0);
94134
+ (0, import_react66.useEffect)(() => {
93673
94135
  if (selectedCandidateIndex < candidateListScrollOffset) {
93674
94136
  setCandidateListScrollOffset(selectedCandidateIndex);
93675
94137
  } else if (selectedCandidateIndex >= candidateListScrollOffset + VISIBLE_CANDIDATES) {
@@ -93696,7 +94158,7 @@ var TriageDuplicates = ({
93696
94158
  return null;
93697
94159
  }
93698
94160
  };
93699
- const analyzeIssue = (0, import_react65.useCallback)(
94161
+ const analyzeIssue = (0, import_react66.useCallback)(
93700
94162
  async (issue) => {
93701
94163
  const dupComment = issue.comments.find(
93702
94164
  (c) => c.body.includes("Found possible duplicate issues:")
@@ -93795,7 +94257,7 @@ Return a JSON object with:
93795
94257
  },
93796
94258
  abortSignal: new AbortController().signal,
93797
94259
  promptId: "triage-duplicates",
93798
- role: "utility_tool" /* UTILITY_TOOL */
94260
+ role: LlmRole.UTILITY_TOOL
93799
94261
  });
93800
94262
  const rec = response;
93801
94263
  let canonical;
@@ -93837,7 +94299,7 @@ Return a JSON object with:
93837
94299
  },
93838
94300
  [config]
93839
94301
  );
93840
- (0, import_react65.useEffect)(() => {
94302
+ (0, import_react66.useEffect)(() => {
93841
94303
  if (state.issues.length === 0) return;
93842
94304
  const analyzeNext = async () => {
93843
94305
  const issuesToAnalyze = state.issues.slice(
@@ -93886,7 +94348,7 @@ Return a JSON object with:
93886
94348
  state.analyzingIds,
93887
94349
  analyzeIssue
93888
94350
  ]);
93889
- (0, import_react65.useEffect)(() => {
94351
+ (0, import_react66.useEffect)(() => {
93890
94352
  const issue = state.issues[state.currentIndex];
93891
94353
  if (!issue) return;
93892
94354
  const analysis = state.analysisCache.get(issue.number);
@@ -93922,7 +94384,7 @@ Return a JSON object with:
93922
94384
  state.analysisCache,
93923
94385
  state.analyzingIds
93924
94386
  ]);
93925
- const fetchIssues = (0, import_react65.useCallback)(async (limit) => {
94387
+ const fetchIssues = (0, import_react66.useCallback)(async (limit) => {
93926
94388
  try {
93927
94389
  const { stdout } = await spawnAsync("gh", [
93928
94390
  "issue",
@@ -93962,10 +94424,10 @@ Return a JSON object with:
93962
94424
  }));
93963
94425
  }
93964
94426
  }, []);
93965
- (0, import_react65.useEffect)(() => {
94427
+ (0, import_react66.useEffect)(() => {
93966
94428
  void fetchIssues(initialLimit);
93967
94429
  }, [fetchIssues, initialLimit]);
93968
- const handleNext = (0, import_react65.useCallback)(() => {
94430
+ const handleNext = (0, import_react66.useCallback)(() => {
93969
94431
  const nextIndex = state.currentIndex + 1;
93970
94432
  if (nextIndex < state.issues.length) {
93971
94433
  setFocusSection("target");
@@ -94473,7 +94935,7 @@ Return a JSON object with:
94473
94935
  };
94474
94936
 
94475
94937
  // packages/cli/src/ui/components/triage/TriageIssues.tsx
94476
- var import_react66 = __toESM(require_react(), 1);
94938
+ var import_react67 = __toESM(require_react(), 1);
94477
94939
  var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
94478
94940
  var VISIBLE_LINES_COLLAPSED2 = 8;
94479
94941
  var VISIBLE_LINES_EXPANDED2 = 20;
@@ -94492,7 +94954,7 @@ var TriageIssues = ({
94492
94954
  until
94493
94955
  }) => {
94494
94956
  const keyMatchers = useKeyMatchers();
94495
- const [state, setState] = (0, import_react66.useState)({
94957
+ const [state, setState] = (0, import_react67.useState)({
94496
94958
  status: "loading",
94497
94959
  issues: [],
94498
94960
  currentIndex: 0,
@@ -94500,15 +94962,15 @@ var TriageIssues = ({
94500
94962
  analyzingIds: /* @__PURE__ */ new Set(),
94501
94963
  message: "Fetching issues..."
94502
94964
  });
94503
- const [targetExpanded, setTargetExpanded] = (0, import_react66.useState)(false);
94504
- const [targetScrollOffset, setTargetScrollOffset] = (0, import_react66.useState)(0);
94505
- const [isEditingComment, setIsEditingComment] = (0, import_react66.useState)(false);
94506
- const [processedHistory, setProcessedHistory] = (0, import_react66.useState)(
94965
+ const [targetExpanded, setTargetExpanded] = (0, import_react67.useState)(false);
94966
+ const [targetScrollOffset, setTargetScrollOffset] = (0, import_react67.useState)(0);
94967
+ const [isEditingComment, setIsEditingComment] = (0, import_react67.useState)(false);
94968
+ const [processedHistory, setProcessedHistory] = (0, import_react67.useState)(
94507
94969
  []
94508
94970
  );
94509
- const [showHistory, setShowHistory] = (0, import_react66.useState)(false);
94510
- const abortControllerRef = (0, import_react66.useRef)(new AbortController());
94511
- (0, import_react66.useEffect)(
94971
+ const [showHistory, setShowHistory] = (0, import_react67.useState)(false);
94972
+ const abortControllerRef = (0, import_react67.useRef)(new AbortController());
94973
+ (0, import_react67.useEffect)(
94512
94974
  () => () => {
94513
94975
  abortControllerRef.current.abort();
94514
94976
  },
@@ -94520,12 +94982,12 @@ var TriageIssues = ({
94520
94982
  });
94521
94983
  const currentIssue = state.issues[state.currentIndex];
94522
94984
  const analysis = currentIssue ? state.analysisCache.get(currentIssue.number) : void 0;
94523
- (0, import_react66.useEffect)(() => {
94985
+ (0, import_react67.useEffect)(() => {
94524
94986
  if (analysis?.suggested_comment && !isEditingComment) {
94525
94987
  commentBuffer.setText(analysis.suggested_comment);
94526
94988
  }
94527
94989
  }, [analysis, commentBuffer, isEditingComment]);
94528
- const fetchIssues = (0, import_react66.useCallback)(
94990
+ const fetchIssues = (0, import_react67.useCallback)(
94529
94991
  async (limit) => {
94530
94992
  try {
94531
94993
  const searchParts = [
@@ -94573,10 +95035,10 @@ var TriageIssues = ({
94573
95035
  },
94574
95036
  [until]
94575
95037
  );
94576
- (0, import_react66.useEffect)(() => {
95038
+ (0, import_react67.useEffect)(() => {
94577
95039
  void fetchIssues(initialLimit);
94578
95040
  }, [fetchIssues, initialLimit]);
94579
- const analyzeIssue = (0, import_react66.useCallback)(
95041
+ const analyzeIssue = (0, import_react67.useCallback)(
94580
95042
  async (issue) => {
94581
95043
  const client = config.getBaseLlmClient();
94582
95044
  const prompt = `
@@ -94629,13 +95091,13 @@ Return a JSON object with:
94629
95091
  },
94630
95092
  abortSignal: abortControllerRef.current.signal,
94631
95093
  promptId: "triage-issues",
94632
- role: "utility_tool" /* UTILITY_TOOL */
95094
+ role: LlmRole.UTILITY_TOOL
94633
95095
  });
94634
95096
  return response;
94635
95097
  },
94636
95098
  [config]
94637
95099
  );
94638
- (0, import_react66.useEffect)(() => {
95100
+ (0, import_react67.useEffect)(() => {
94639
95101
  if (state.issues.length === 0) return;
94640
95102
  const analyzeNext = async () => {
94641
95103
  const issuesToAnalyze = state.issues.slice(
@@ -94682,7 +95144,7 @@ Return a JSON object with:
94682
95144
  state.analyzingIds,
94683
95145
  analyzeIssue
94684
95146
  ]);
94685
- const handleNext = (0, import_react66.useCallback)(() => {
95147
+ const handleNext = (0, import_react67.useCallback)(() => {
94686
95148
  const nextIndex = state.currentIndex + 1;
94687
95149
  if (nextIndex < state.issues.length) {
94688
95150
  setTargetExpanded(false);
@@ -94697,7 +95159,7 @@ Return a JSON object with:
94697
95159
  }));
94698
95160
  }
94699
95161
  }, [state.currentIndex, state.issues.length]);
94700
- (0, import_react66.useEffect)(() => {
95162
+ (0, import_react67.useEffect)(() => {
94701
95163
  if (currentIssue && state.analysisCache.has(currentIssue.number)) {
94702
95164
  const res = state.analysisCache.get(currentIssue.number);
94703
95165
  if (res.recommendation === "keep") {
@@ -95203,10 +95665,16 @@ var planCommand = {
95203
95665
  return;
95204
95666
  }
95205
95667
  const previousApprovalMode = config.getApprovalMode();
95206
- config.setApprovalMode("plan" /* PLAN */);
95207
- if (previousApprovalMode !== "plan" /* PLAN */) {
95668
+ config.setApprovalMode(ApprovalMode.PLAN);
95669
+ if (previousApprovalMode !== ApprovalMode.PLAN) {
95208
95670
  coreEvents.emitFeedback("info", "Switched to Plan Mode.");
95209
95671
  }
95672
+ if (context.invocation?.args) {
95673
+ return {
95674
+ type: "submit_prompt",
95675
+ content: context.invocation.args
95676
+ };
95677
+ }
95210
95678
  const approvedPlanPath = config.getApprovedPlanPath();
95211
95679
  if (!approvedPlanPath) {
95212
95680
  return;
@@ -95223,12 +95691,14 @@ var planCommand = {
95223
95691
  type: "gemini" /* GEMINI */,
95224
95692
  text: partToString(content.llmContent)
95225
95693
  });
95694
+ return;
95226
95695
  } catch (error) {
95227
95696
  coreEvents.emitFeedback(
95228
95697
  "error",
95229
95698
  `Failed to read approved plan at ${approvedPlanPath}: ${error}`,
95230
95699
  error
95231
95700
  );
95701
+ return;
95232
95702
  }
95233
95703
  },
95234
95704
  subCommands: [
@@ -95237,6 +95707,7 @@ var planCommand = {
95237
95707
  description: "Copy the currently approved plan to your clipboard",
95238
95708
  kind: "built-in" /* BUILT_IN */,
95239
95709
  autoExecute: true,
95710
+ takesArgs: false,
95240
95711
  action: copyAction
95241
95712
  }
95242
95713
  ]
@@ -95254,10 +95725,10 @@ var categorizeRulesByMode = (rules) => {
95254
95725
  rules.forEach((rule) => {
95255
95726
  const modes = rule.modes?.length ? rule.modes : ALL_MODES;
95256
95727
  const modeSet = new Set(modes);
95257
- if (modeSet.has("default" /* DEFAULT */)) result.normal.push(rule);
95258
- if (modeSet.has("autoEdit" /* AUTO_EDIT */)) result.autoEdit.push(rule);
95259
- if (modeSet.has("yolo" /* YOLO */)) result.yolo.push(rule);
95260
- if (modeSet.has("plan" /* PLAN */)) result.plan.push(rule);
95728
+ if (modeSet.has(ApprovalMode.DEFAULT)) result.normal.push(rule);
95729
+ if (modeSet.has(ApprovalMode.AUTO_EDIT)) result.autoEdit.push(rule);
95730
+ if (modeSet.has(ApprovalMode.YOLO)) result.yolo.push(rule);
95731
+ if (modeSet.has(ApprovalMode.PLAN)) result.plan.push(rule);
95261
95732
  });
95262
95733
  return result;
95263
95734
  };
@@ -96212,7 +96683,15 @@ var skillsCommand = {
96212
96683
  action: reloadAction2
96213
96684
  }
96214
96685
  ],
96215
- action: listAction4
96686
+ action: async (context, args) => {
96687
+ if (args) {
96688
+ const parsed = parseSlashCommand(`/${args}`, skillsCommand.subCommands);
96689
+ if (parsed.commandToExecute?.action) {
96690
+ return parsed.commandToExecute.action(context, parsed.args);
96691
+ }
96692
+ }
96693
+ return listAction4(context, args);
96694
+ }
96216
96695
  };
96217
96696
 
96218
96697
  // packages/cli/src/ui/commands/settingsCommand.ts
@@ -96228,15 +96707,15 @@ var settingsCommand = {
96228
96707
  })
96229
96708
  };
96230
96709
 
96231
- // packages/cli/src/ui/commands/shellsCommand.ts
96232
- var shellsCommand = {
96233
- name: "shells",
96234
- altNames: ["bashes"],
96710
+ // packages/cli/src/ui/commands/tasksCommand.ts
96711
+ var tasksCommand = {
96712
+ name: "tasks",
96713
+ altNames: ["bg", "background"],
96235
96714
  kind: "built-in" /* BUILT_IN */,
96236
- description: "Toggle background shells view",
96715
+ description: "Toggle background tasks view",
96237
96716
  autoExecute: true,
96238
96717
  action: async (context) => {
96239
- context.ui.toggleBackgroundShell();
96718
+ context.ui.toggleBackgroundTasks();
96240
96719
  }
96241
96720
  };
96242
96721
 
@@ -96594,7 +97073,7 @@ var upgradeCommand = {
96594
97073
  action: async (context) => {
96595
97074
  const config = context.services.agentContext?.config;
96596
97075
  const authType = config?.getContentGeneratorConfig()?.authType;
96597
- if (authType !== "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
97076
+ if (authType !== AuthType.LOGIN_WITH_GOOGLE) {
96598
97077
  return {
96599
97078
  type: "message",
96600
97079
  messageType: "error",
@@ -96760,11 +97239,11 @@ var BuiltinCommandLoader = class {
96760
97239
  }
96761
97240
  ] : [skillsCommand] : [],
96762
97241
  settingsCommand,
96763
- shellsCommand,
97242
+ tasksCommand,
96764
97243
  vimCommand,
96765
97244
  setupGithubCommand,
96766
97245
  terminalSetupCommand,
96767
- ...this.config?.getContentGeneratorConfig()?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? [upgradeCommand] : []
97246
+ ...this.config?.getContentGeneratorConfig()?.authType === AuthType.LOGIN_WITH_GOOGLE ? [upgradeCommand] : []
96768
97247
  ];
96769
97248
  handle?.end();
96770
97249
  return allDefinitions.filter((cmd) => cmd !== null);
@@ -96907,11 +97386,11 @@ var ShellProcessor = class {
96907
97386
  },
96908
97387
  void 0
96909
97388
  );
96910
- if (decision === "deny" /* DENY */) {
97389
+ if (decision === PolicyDecision.DENY) {
96911
97390
  throw new Error(
96912
97391
  `${this.commandName} cannot be run. Blocked command: "${command}". Reason: Blocked by policy.`
96913
97392
  );
96914
- } else if (decision === "ask_user" /* ASK_USER */) {
97393
+ } else if (decision === PolicyDecision.ASK_USER) {
96915
97394
  commandsToConfirm.add(command);
96916
97395
  }
96917
97396
  }
@@ -97521,6 +98000,10 @@ export {
97521
98000
  ACTIVE_SHELL_MAX_LINES,
97522
98001
  COMPLETED_SHELL_MAX_LINES,
97523
98002
  SUBAGENT_MAX_LINES,
98003
+ SKILLS_DOCS_URL,
98004
+ COMPACT_TOOL_SUBVIEW_MAX_LINES,
98005
+ MAX_SHELL_OUTPUT_SIZE,
98006
+ SHELL_OUTPUT_TRUNCATION_BUFFER,
97524
98007
  require_tinygradient,
97525
98008
  INK_SUPPORTED_NAMES,
97526
98009
  INK_NAME_TO_HEX_MAP,
@@ -97546,6 +98029,7 @@ export {
97546
98029
  escapeAnsiCtrlCodes,
97547
98030
  require_react,
97548
98031
  mapCoreStatusToDisplayStatus,
98032
+ isTodoList,
97549
98033
  RESUME_LATEST,
97550
98034
  SessionError,
97551
98035
  cleanMessage,
@@ -97651,7 +98135,6 @@ export {
97651
98135
  parseMouseEvent,
97652
98136
  isIncompleteMouseSequence,
97653
98137
  useFocus,
97654
- appEvents,
97655
98138
  SettingsContext,
97656
98139
  useSettings,
97657
98140
  useSettingsStore,