@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
@@ -44,6 +44,8 @@ import {
44
44
  convertToRestPayload,
45
45
  createCache,
46
46
  decodeTagName,
47
+ deleteSessionArtifactsAsync,
48
+ deleteSubagentSessionDirAndArtifactsAsync,
47
49
  disableBracketedPasteMode,
48
50
  disableKittyKeyboardProtocol,
49
51
  disableModifyOtherKeys,
@@ -139,6 +141,7 @@ import {
139
141
  require_toml,
140
142
  require_undici,
141
143
  require_valid,
144
+ resetBrowserSession,
142
145
  sanitizeFilenamePart,
143
146
  sessionId,
144
147
  shouldLaunchBrowser,
@@ -153,7 +156,7 @@ import {
153
156
  tokenLimit,
154
157
  uiTelemetryService,
155
158
  yellowBright
156
- } from "./chunk-VB55KQW3.js";
159
+ } from "./chunk-43UUP7VO.js";
157
160
  import {
158
161
  ApprovalMode,
159
162
  CoreEvent,
@@ -181,7 +184,11 @@ import {
181
184
  shortenPath,
182
185
  tildeifyPath,
183
186
  unescapePath
184
- } from "./chunk-MYI75E6G.js";
187
+ } from "./chunk-5OOT636U.js";
188
+ import {
189
+ AppEvent,
190
+ appEvents
191
+ } from "./chunk-U4FACSVX.js";
185
192
  import {
186
193
  __commonJS,
187
194
  __export,
@@ -34564,12 +34571,12 @@ var require_prompt = __commonJS({
34564
34571
  var readline = __require("readline");
34565
34572
  var _require = require_util3();
34566
34573
  var action = _require.action;
34567
- var EventEmitter6 = __require("events");
34574
+ var EventEmitter5 = __require("events");
34568
34575
  var _require2 = require_src3();
34569
34576
  var beep2 = _require2.beep;
34570
34577
  var cursor = _require2.cursor;
34571
34578
  var color = require_kleur();
34572
- var Prompt = class extends EventEmitter6 {
34579
+ var Prompt = class extends EventEmitter5 {
34573
34580
  constructor(opts = {}) {
34574
34581
  super();
34575
34582
  this.firstRender = true;
@@ -36569,9 +36576,9 @@ var require_prompts = __commonJS({
36569
36576
  $4.date = (args) => toPrompt("DatePrompt", args);
36570
36577
  $4.confirm = (args) => toPrompt("ConfirmPrompt", args);
36571
36578
  $4.list = (args) => {
36572
- const sep5 = args.separator || ",";
36579
+ const sep4 = args.separator || ",";
36573
36580
  return toPrompt("TextPrompt", args, {
36574
- onSubmit: (str) => str.split(sep5).map((s3) => s3.trim())
36581
+ onSubmit: (str) => str.split(sep4).map((s3) => s3.trim())
36575
36582
  });
36576
36583
  };
36577
36584
  $4.toggle = (args) => toPrompt("TogglePrompt", args);
@@ -37029,10 +37036,10 @@ var require_prompt2 = __commonJS({
37029
37036
  "use strict";
37030
37037
  var readline = __require("readline");
37031
37038
  var { action } = require_util4();
37032
- var EventEmitter6 = __require("events");
37039
+ var EventEmitter5 = __require("events");
37033
37040
  var { beep: beep2, cursor } = require_src3();
37034
37041
  var color = require_kleur();
37035
- var Prompt = class extends EventEmitter6 {
37042
+ var Prompt = class extends EventEmitter5 {
37036
37043
  constructor(opts = {}) {
37037
37044
  super();
37038
37045
  this.firstRender = true;
@@ -38859,9 +38866,9 @@ var require_prompts2 = __commonJS({
38859
38866
  $4.date = (args) => toPrompt("DatePrompt", args);
38860
38867
  $4.confirm = (args) => toPrompt("ConfirmPrompt", args);
38861
38868
  $4.list = (args) => {
38862
- const sep5 = args.separator || ",";
38869
+ const sep4 = args.separator || ",";
38863
38870
  return toPrompt("TextPrompt", args, {
38864
- onSubmit: (str) => str.split(sep5).map((s3) => s3.trim())
38871
+ onSubmit: (str) => str.split(sep4).map((s3) => s3.trim())
38865
38872
  });
38866
38873
  };
38867
38874
  $4.toggle = (args) => toPrompt("TogglePrompt", args);
@@ -43472,6 +43479,7 @@ function mapCoreStatusToDisplayStatus(coreStatus) {
43472
43479
  return checkExhaustive(coreStatus);
43473
43480
  }
43474
43481
  }
43482
+ var isTodoList = (res) => typeof res === "object" && res !== null && "todos" in res;
43475
43483
  var emptyIcon = " ";
43476
43484
 
43477
43485
  // packages/cli/src/utils/cleanup.ts
@@ -43509,6 +43517,10 @@ async function runExitCleanup() {
43509
43517
  }
43510
43518
  }
43511
43519
  cleanupFunctions.length = 0;
43520
+ try {
43521
+ await resetBrowserSession();
43522
+ } catch (_2) {
43523
+ }
43512
43524
  if (configForTelemetry) {
43513
43525
  try {
43514
43526
  await configForTelemetry.dispose();
@@ -43607,12 +43619,15 @@ var ConsolePatcher = class {
43607
43619
  };
43608
43620
  formatArgs = (args) => util.format(...args);
43609
43621
  patchConsoleMethod = (type) => (...args) => {
43610
- if (this.params.stderr) {
43611
- if (type !== "debug" || this.params.debugMode) {
43612
- this.originalConsoleError(this.formatArgs(args));
43622
+ if (this.params.interactive === false) {
43623
+ if ((type === "info" || type === "log") && !this.params.debugMode) {
43624
+ return;
43613
43625
  }
43614
- } else {
43615
- if (type !== "debug" || this.params.debugMode) {
43626
+ }
43627
+ if (type !== "debug" || this.params.debugMode) {
43628
+ if (this.params.stderr) {
43629
+ this.originalConsoleError(this.formatArgs(args));
43630
+ } else {
43616
43631
  this.params.onNewMessage?.({
43617
43632
  type,
43618
43633
  content: this.formatArgs(args),
@@ -56110,6 +56125,10 @@ var COMPLETED_SHELL_MAX_LINES = 15;
56110
56125
  var SUBAGENT_MAX_LINES = 15;
56111
56126
  var MIN_TERMINAL_WIDTH_FOR_FULL_LABEL = 100;
56112
56127
  var DEFAULT_COMPRESSION_THRESHOLD = 0.5;
56128
+ var SKILLS_DOCS_URL = "https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/skills.md";
56129
+ var COMPACT_TOOL_SUBVIEW_MAX_LINES = 15;
56130
+ var MAX_SHELL_OUTPUT_SIZE = 1e7;
56131
+ var SHELL_OUTPUT_TRUNCATION_BUFFER = 1e6;
56113
56132
 
56114
56133
  // packages/cli/src/ui/themes/theme.ts
56115
56134
  var import_tinygradient = __toESM(require_tinygradient(), 1);
@@ -58627,33 +58646,11 @@ function deriveShortIdFromFileName(fileName) {
58627
58646
  }
58628
58647
  return null;
58629
58648
  }
58630
- function getSessionLogPath(tempDir, safeSessionId) {
58631
- return path4.join(tempDir, "logs", `session-${safeSessionId}.jsonl`);
58632
- }
58633
- async function deleteSessionArtifactsAsync(sessionId2, config) {
58649
+ async function cleanupSessionAndSubagentsAsync(sessionId2, config) {
58634
58650
  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
- }
58651
+ const chatsDir = path4.join(tempDir, "chats");
58652
+ await deleteSessionArtifactsAsync(sessionId2, tempDir);
58653
+ await deleteSubagentSessionDirAndArtifactsAsync(sessionId2, chatsDir, tempDir);
58657
58654
  }
58658
58655
  async function cleanupExpiredSessions(config, settings) {
58659
58656
  const result = {
@@ -58717,7 +58714,7 @@ async function cleanupExpiredSessions(config, settings) {
58717
58714
  if (!fullSessionId || fullSessionId !== config.getSessionId()) {
58718
58715
  await fs8.unlink(filePath);
58719
58716
  if (fullSessionId) {
58720
- await deleteSessionArtifactsAsync(fullSessionId, config);
58717
+ await cleanupSessionAndSubagentsAsync(fullSessionId, config);
58721
58718
  }
58722
58719
  result.deleted++;
58723
58720
  } else {
@@ -58738,7 +58735,7 @@ async function cleanupExpiredSessions(config, settings) {
58738
58735
  await fs8.unlink(sessionPath);
58739
58736
  const sessionId2 = sessionToDelete.sessionInfo?.id;
58740
58737
  if (sessionId2) {
58741
- await deleteSessionArtifactsAsync(sessionId2, config);
58738
+ await cleanupSessionAndSubagentsAsync(sessionId2, config);
58742
58739
  }
58743
58740
  if (config.getDebugMode()) {
58744
58741
  debugLogger.debug(
@@ -59132,7 +59129,7 @@ var SETTINGS_SCHEMA = {
59132
59129
  category: "General",
59133
59130
  requiresRestart: false,
59134
59131
  default: false,
59135
- description: "Enable run-event notifications for action-required prompts and session completion. Currently macOS only.",
59132
+ description: "Enable run-event notifications for action-required prompts and session completion.",
59136
59133
  showInDialog: true
59137
59134
  },
59138
59135
  checkpointing: {
@@ -59164,13 +59161,22 @@ var SETTINGS_SCHEMA = {
59164
59161
  description: "Planning features configuration.",
59165
59162
  showInDialog: false,
59166
59163
  properties: {
59164
+ enabled: {
59165
+ type: "boolean",
59166
+ label: "Enable Plan Mode",
59167
+ category: "General",
59168
+ requiresRestart: true,
59169
+ default: true,
59170
+ description: "Enable Plan Mode for read-only safety during planning.",
59171
+ showInDialog: true
59172
+ },
59167
59173
  directory: {
59168
59174
  type: "string",
59169
59175
  label: "Plan Directory",
59170
59176
  category: "General",
59171
59177
  requiresRestart: true,
59172
59178
  default: void 0,
59173
- description: "The directory where planning artifacts are stored. If not specified, defaults to the system temporary directory.",
59179
+ 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
59180
  showInDialog: true
59175
59181
  },
59176
59182
  modelRouting: {
@@ -59418,6 +59424,15 @@ var SETTINGS_SCHEMA = {
59418
59424
  description: 'Show the "? for shortcuts" hint above the input.',
59419
59425
  showInDialog: true
59420
59426
  },
59427
+ compactToolOutput: {
59428
+ type: "boolean",
59429
+ label: "Compact Tool Output",
59430
+ category: "UI",
59431
+ requiresRestart: false,
59432
+ default: false,
59433
+ description: "Display tool outputs (like directory listings and file reads) in a compact, structured format.",
59434
+ showInDialog: true
59435
+ },
59421
59436
  hideBanner: {
59422
59437
  type: "boolean",
59423
59438
  label: "Hide Banner",
@@ -60029,6 +60044,15 @@ var SETTINGS_SCHEMA = {
60029
60044
  description: "Disable user input on browser window during automation.",
60030
60045
  showInDialog: false
60031
60046
  },
60047
+ maxActionsPerTask: {
60048
+ type: "number",
60049
+ label: "Max Actions Per Task",
60050
+ category: "Advanced",
60051
+ requiresRestart: false,
60052
+ default: 100,
60053
+ description: "The maximum number of tool calls allowed per browser task. Enforcement is hard: the agent will be terminated when the limit is reached.",
60054
+ showInDialog: false
60055
+ },
60032
60056
  confirmSensitiveActions: {
60033
60057
  type: "boolean",
60034
60058
  label: "Confirm Sensitive Actions",
@@ -60097,6 +60121,16 @@ var SETTINGS_SCHEMA = {
60097
60121
  description: "Maximum number of directories to search for memory.",
60098
60122
  showInDialog: true
60099
60123
  },
60124
+ memoryBoundaryMarkers: {
60125
+ type: "array",
60126
+ label: "Memory Boundary Markers",
60127
+ category: "Context",
60128
+ requiresRestart: true,
60129
+ default: [".git"],
60130
+ 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.",
60131
+ showInDialog: false,
60132
+ items: { type: "string" }
60133
+ },
60100
60134
  includeDirectories: {
60101
60135
  type: "array",
60102
60136
  label: "Include Directories",
@@ -60248,6 +60282,20 @@ var SETTINGS_SCHEMA = {
60248
60282
  `,
60249
60283
  showInDialog: true
60250
60284
  },
60285
+ backgroundCompletionBehavior: {
60286
+ type: "enum",
60287
+ label: "Background Completion Behavior",
60288
+ category: "Tools",
60289
+ requiresRestart: false,
60290
+ default: "silent",
60291
+ 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.",
60292
+ showInDialog: false,
60293
+ options: [
60294
+ { label: "Silent", value: "silent" },
60295
+ { label: "Inject", value: "inject" },
60296
+ { label: "Notify", value: "notify" }
60297
+ ]
60298
+ },
60251
60299
  pager: {
60252
60300
  type: "string",
60253
60301
  label: "Pager",
@@ -60670,54 +60718,6 @@ var SETTINGS_SCHEMA = {
60670
60718
  description: "Setting to enable experimental features",
60671
60719
  showInDialog: false,
60672
60720
  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
60721
  enableAgents: {
60722
60722
  type: "boolean",
60723
60723
  label: "Enable Agents",
@@ -60808,15 +60808,6 @@ var SETTINGS_SCHEMA = {
60808
60808
  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
60809
  showInDialog: true
60810
60810
  },
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
60811
  taskTracker: {
60821
60812
  type: "boolean",
60822
60813
  label: "Task Tracker",
@@ -60911,6 +60902,15 @@ var SETTINGS_SCHEMA = {
60911
60902
  description: "Replace the built-in save_memory tool with a memory manager subagent that supports adding, removing, de-duplicating, and organizing memories.",
60912
60903
  showInDialog: true
60913
60904
  },
60905
+ contextManagement: {
60906
+ type: "boolean",
60907
+ label: "Enable Context Management",
60908
+ category: "Experimental",
60909
+ requiresRestart: true,
60910
+ default: false,
60911
+ description: "Enable logic for context management.",
60912
+ showInDialog: true
60913
+ },
60914
60914
  topicUpdateNarration: {
60915
60915
  type: "boolean",
60916
60916
  label: "Topic & Update Narration",
@@ -61166,6 +61166,159 @@ var SETTINGS_SCHEMA = {
61166
61166
  mergeStrategy: "concat" /* CONCAT */
61167
61167
  }
61168
61168
  },
61169
+ contextManagement: {
61170
+ type: "object",
61171
+ label: "Context Management",
61172
+ category: "Experimental",
61173
+ requiresRestart: true,
61174
+ default: {},
61175
+ description: "Settings for agent history and tool distillation context management.",
61176
+ showInDialog: false,
61177
+ properties: {
61178
+ historyWindow: {
61179
+ type: "object",
61180
+ label: "History Window Settings",
61181
+ category: "Context Management",
61182
+ requiresRestart: true,
61183
+ default: {},
61184
+ showInDialog: false,
61185
+ properties: {
61186
+ maxTokens: {
61187
+ type: "number",
61188
+ label: "Max Tokens",
61189
+ category: "Context Management",
61190
+ requiresRestart: true,
61191
+ default: 15e4,
61192
+ description: "The number of tokens to allow before triggering compression.",
61193
+ showInDialog: false
61194
+ },
61195
+ retainedTokens: {
61196
+ type: "number",
61197
+ label: "Retained Tokens",
61198
+ category: "Context Management",
61199
+ requiresRestart: true,
61200
+ default: 4e4,
61201
+ description: "The number of tokens to always retain.",
61202
+ showInDialog: false
61203
+ }
61204
+ }
61205
+ },
61206
+ messageLimits: {
61207
+ type: "object",
61208
+ label: "Message Limits",
61209
+ category: "Context Management",
61210
+ requiresRestart: true,
61211
+ default: {},
61212
+ showInDialog: false,
61213
+ properties: {
61214
+ normalMaxTokens: {
61215
+ type: "number",
61216
+ label: "Normal Maximum Tokens",
61217
+ category: "Context Management",
61218
+ requiresRestart: true,
61219
+ default: 2500,
61220
+ description: "The target number of tokens to budget for a normal conversation turn.",
61221
+ showInDialog: false
61222
+ },
61223
+ retainedMaxTokens: {
61224
+ type: "number",
61225
+ label: "Retained Maximum Tokens",
61226
+ category: "Context Management",
61227
+ requiresRestart: true,
61228
+ default: 12e3,
61229
+ description: "The maximum number of tokens a single conversation turn can consume before truncation.",
61230
+ showInDialog: false
61231
+ },
61232
+ normalizationHeadRatio: {
61233
+ type: "number",
61234
+ label: "Normalization Head Ratio",
61235
+ category: "Context Management",
61236
+ requiresRestart: true,
61237
+ default: 0.25,
61238
+ description: "The ratio of tokens to retain from the beginning of a truncated message (0.0 to 1.0).",
61239
+ showInDialog: false
61240
+ }
61241
+ }
61242
+ },
61243
+ tools: {
61244
+ type: "object",
61245
+ label: "Context Management Tools",
61246
+ category: "Context Management",
61247
+ requiresRestart: true,
61248
+ default: {},
61249
+ showInDialog: false,
61250
+ properties: {
61251
+ distillation: {
61252
+ type: "object",
61253
+ label: "Tool Distillation",
61254
+ category: "Context Management",
61255
+ requiresRestart: true,
61256
+ default: {},
61257
+ showInDialog: false,
61258
+ properties: {
61259
+ maxOutputTokens: {
61260
+ type: "number",
61261
+ label: "Max Output Tokens",
61262
+ category: "Context Management",
61263
+ requiresRestart: true,
61264
+ default: 1e4,
61265
+ description: "Maximum tokens to show to the model when truncating large tool outputs.",
61266
+ showInDialog: false
61267
+ },
61268
+ summarizationThresholdTokens: {
61269
+ type: "number",
61270
+ label: "Tool Summarization Threshold",
61271
+ category: "Context Management",
61272
+ requiresRestart: true,
61273
+ default: 2e4,
61274
+ description: "Threshold above which truncated tool outputs will be summarized by an LLM.",
61275
+ showInDialog: false
61276
+ }
61277
+ }
61278
+ },
61279
+ outputMasking: {
61280
+ type: "object",
61281
+ label: "Tool Output Masking",
61282
+ category: "Context Management",
61283
+ requiresRestart: true,
61284
+ ignoreInDocs: false,
61285
+ default: {},
61286
+ description: "Advanced settings for tool output masking to manage context window efficiency.",
61287
+ showInDialog: false,
61288
+ properties: {
61289
+ protectionThresholdTokens: {
61290
+ type: "number",
61291
+ label: "Tool Protection Threshold (Tokens)",
61292
+ category: "Context Management",
61293
+ requiresRestart: true,
61294
+ default: 5e4,
61295
+ description: "Minimum number of tokens to protect from masking (most recent tool outputs).",
61296
+ showInDialog: false
61297
+ },
61298
+ minPrunableThresholdTokens: {
61299
+ type: "number",
61300
+ label: "Min Prunable Tokens Threshold",
61301
+ category: "Context Management",
61302
+ requiresRestart: true,
61303
+ default: 3e4,
61304
+ description: "Minimum prunable tokens required to trigger a masking pass.",
61305
+ showInDialog: false
61306
+ },
61307
+ protectLatestTurn: {
61308
+ type: "boolean",
61309
+ label: "Protect Latest Turn",
61310
+ category: "Context Management",
61311
+ requiresRestart: true,
61312
+ default: true,
61313
+ description: "Ensures the absolute latest turn is never masked, regardless of token count.",
61314
+ showInDialog: false
61315
+ }
61316
+ }
61317
+ }
61318
+ }
61319
+ }
61320
+ }
61321
+ },
61169
61322
  admin: {
61170
61323
  type: "object",
61171
61324
  label: "Admin",
@@ -62919,7 +63072,7 @@ function migrateExperimentalSettings(settings, loadedSettings, scope, removeDepr
62919
63072
  let modified = false;
62920
63073
  const migrateExperimental = (oldKey, migrateFn) => {
62921
63074
  const old = experimentalSettings[oldKey];
62922
- if (old) {
63075
+ if (old !== void 0) {
62923
63076
  foundDeprecated?.push(`experimental.${oldKey}`);
62924
63077
  migrateFn(old);
62925
63078
  modified = true;
@@ -62971,6 +63124,21 @@ function migrateExperimentalSettings(settings, loadedSettings, scope, removeDepr
62971
63124
  if (old["enabled"] !== void 0) override["enabled"] = old["enabled"];
62972
63125
  agentsOverrides["cli_help"] = override;
62973
63126
  });
63127
+ migrateExperimental("plan", (planValue) => {
63128
+ const generalSettings = settings.general || {};
63129
+ const newGeneral = { ...generalSettings };
63130
+ const planSettings = (
63131
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
63132
+ newGeneral["plan"] || {}
63133
+ );
63134
+ const newPlan = { ...planSettings };
63135
+ if (newPlan["enabled"] === void 0) {
63136
+ newPlan["enabled"] = planValue;
63137
+ newGeneral["plan"] = newPlan;
63138
+ loadedSettings.setValue(scope, "general", newGeneral);
63139
+ modified = true;
63140
+ }
63141
+ });
62974
63142
  if (modified) {
62975
63143
  agentsSettings["overrides"] = agentsOverrides;
62976
63144
  loadedSettings.setValue(scope, "agents", agentsSettings);
@@ -62978,6 +63146,7 @@ function migrateExperimentalSettings(settings, loadedSettings, scope, removeDepr
62978
63146
  const newExperimental = { ...experimentalSettings };
62979
63147
  delete newExperimental["codebaseInvestigatorSettings"];
62980
63148
  delete newExperimental["cliHelpAgentSettings"];
63149
+ delete newExperimental["plan"];
62981
63150
  loadedSettings.setValue(scope, "experimental", newExperimental);
62982
63151
  }
62983
63152
  return true;
@@ -63274,19 +63443,6 @@ var useFocus = () => {
63274
63443
  };
63275
63444
  };
63276
63445
 
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
63446
  // packages/cli/src/ui/utils/terminalCapabilityManager.ts
63291
63447
  import * as fs11 from "node:fs";
63292
63448
 
@@ -63531,6 +63687,12 @@ var TerminalCapabilityManager = class _TerminalCapabilityManager {
63531
63687
  isKittyProtocolEnabled() {
63532
63688
  return this.kittyEnabled;
63533
63689
  }
63690
+ isGhosttyTerminal(env3 = process.env) {
63691
+ const termProgram = env3["TERM_PROGRAM"]?.toLowerCase();
63692
+ const term = env3["TERM"]?.toLowerCase();
63693
+ const name = this.getTerminalName()?.toLowerCase();
63694
+ return !!(name?.includes("ghostty") || termProgram?.includes("ghostty") || term?.includes("ghostty"));
63695
+ }
63534
63696
  supportsOsc9Notifications(env3 = process.env) {
63535
63697
  if (env3["WT_SESSION"]) {
63536
63698
  return false;
@@ -64244,6 +64406,7 @@ var Command = /* @__PURE__ */ ((Command2) => {
64244
64406
  Command2["EXPAND_SUGGESTION"] = "suggest.expand";
64245
64407
  Command2["COLLAPSE_SUGGESTION"] = "suggest.collapse";
64246
64408
  Command2["SUBMIT"] = "input.submit";
64409
+ Command2["QUEUE_MESSAGE"] = "input.queueMessage";
64247
64410
  Command2["NEWLINE"] = "input.newline";
64248
64411
  Command2["OPEN_EXTERNAL_EDITOR"] = "input.openExternalEditor";
64249
64412
  Command2["PASTE_CLIPBOARD"] = "input.paste";
@@ -64270,6 +64433,8 @@ var Command = /* @__PURE__ */ ((Command2) => {
64270
64433
  Command2["UNFOCUS_BACKGROUND_SHELL"] = "background.unfocus";
64271
64434
  Command2["UNFOCUS_BACKGROUND_SHELL_LIST"] = "background.unfocusList";
64272
64435
  Command2["SHOW_BACKGROUND_SHELL_UNFOCUS_WARNING"] = "background.unfocusWarning";
64436
+ Command2["UPDATE_EXTENSION"] = "extension.update";
64437
+ Command2["LINK_EXTENSION"] = "extension.link";
64273
64438
  return Command2;
64274
64439
  })(Command || {});
64275
64440
  var KeyBinding = class _KeyBinding {
@@ -64479,6 +64644,7 @@ var defaultKeyBindingConfig = /* @__PURE__ */ new Map([
64479
64644
  // Text Input
64480
64645
  // Must also exclude shift to allow shift+enter for newline
64481
64646
  ["input.submit" /* SUBMIT */, [new KeyBinding("enter")]],
64647
+ ["input.queueMessage" /* QUEUE_MESSAGE */, [new KeyBinding("tab")]],
64482
64648
  [
64483
64649
  "input.newline" /* NEWLINE */,
64484
64650
  [
@@ -64522,7 +64688,10 @@ var defaultKeyBindingConfig = /* @__PURE__ */ new Map([
64522
64688
  ["background.kill" /* KILL_BACKGROUND_SHELL */, [new KeyBinding("ctrl+k")]],
64523
64689
  ["background.unfocus" /* UNFOCUS_BACKGROUND_SHELL */, [new KeyBinding("shift+tab")]],
64524
64690
  ["background.unfocusList" /* UNFOCUS_BACKGROUND_SHELL_LIST */, [new KeyBinding("tab")]],
64525
- ["background.unfocusWarning" /* SHOW_BACKGROUND_SHELL_UNFOCUS_WARNING */, [new KeyBinding("tab")]]
64691
+ ["background.unfocusWarning" /* SHOW_BACKGROUND_SHELL_UNFOCUS_WARNING */, [new KeyBinding("tab")]],
64692
+ // Extension Controls
64693
+ ["extension.update" /* UPDATE_EXTENSION */, [new KeyBinding("i")]],
64694
+ ["extension.link" /* LINK_EXTENSION */, [new KeyBinding("l")]]
64526
64695
  ]);
64527
64696
  var keybindingsSchema = external_exports.array(
64528
64697
  external_exports.object({
@@ -66644,6 +66813,152 @@ var XCode = new Theme(
66644
66813
  xcodeColors
66645
66814
  );
66646
66815
 
66816
+ // packages/cli/src/ui/themes/builtin/dark/tokyonight-dark.ts
66817
+ var palette = {
66818
+ bg: "#1a1b26",
66819
+ bg_dark: "#16161e",
66820
+ bg_dark1: "#0C0E14",
66821
+ bg_highlight: "#292e42",
66822
+ blue: "#7aa2f7",
66823
+ blue0: "#3d59a1",
66824
+ blue1: "#2ac3de",
66825
+ blue2: "#0db9d7",
66826
+ blue5: "#89ddff",
66827
+ blue6: "#b4f9f8",
66828
+ blue7: "#394b70",
66829
+ comment: "#565f89",
66830
+ cyan: "#7dcfff",
66831
+ fg: "#c0caf5",
66832
+ fg_dark: "#a9b1d6",
66833
+ fg_gutter: "#3b4261",
66834
+ green: "#9ece6a",
66835
+ green1: "#73daca",
66836
+ green2: "#41a6b5",
66837
+ magenta: "#bb9af7",
66838
+ magenta2: "#ff007c",
66839
+ orange: "#ff9e64",
66840
+ purple: "#9d7cd8",
66841
+ red: "#f7768e",
66842
+ red1: "#db4b4b",
66843
+ teal: "#1abc9c",
66844
+ yellow: "#e0af68",
66845
+ diff: {
66846
+ add: "#243e4a",
66847
+ change: "#1f2231",
66848
+ delete: "#4a272f"
66849
+ }
66850
+ };
66851
+ var tokyoNightColors = {
66852
+ type: "dark",
66853
+ Background: palette.bg,
66854
+ Foreground: palette.fg,
66855
+ LightBlue: palette.purple,
66856
+ AccentBlue: palette.magenta,
66857
+ AccentPurple: palette.blue,
66858
+ AccentCyan: palette.cyan,
66859
+ AccentGreen: palette.teal,
66860
+ AccentYellow: palette.yellow,
66861
+ AccentRed: palette.red1,
66862
+ DiffAdded: palette.diff.add,
66863
+ DiffRemoved: palette.diff.delete,
66864
+ Comment: palette.comment,
66865
+ Gray: palette.fg_dark,
66866
+ DarkGray: palette.fg_gutter,
66867
+ FocusColor: palette.blue,
66868
+ GradientColors: [palette.blue, palette.magenta, palette.cyan]
66869
+ };
66870
+ var TokyoNight = new Theme(
66871
+ "Tokyo Night",
66872
+ "dark",
66873
+ {
66874
+ hljs: {
66875
+ display: "block",
66876
+ overflowX: "auto",
66877
+ padding: "0.5em",
66878
+ background: palette.bg,
66879
+ color: palette.fg
66880
+ },
66881
+ "hljs-addition": { background: palette.diff.add },
66882
+ "hljs-attr": { color: palette.green1 },
66883
+ "hljs-attribute": { color: palette.green1 },
66884
+ "hljs-brace": { color: palette.fg_dark },
66885
+ "hljs-built_in": { color: palette.blue1 },
66886
+ "hljs-builtin-symbol": { color: palette.blue1 },
66887
+ "hljs-bullet": {
66888
+ color: palette.orange,
66889
+ fontWeight: "bold"
66890
+ },
66891
+ "hljs-char": { color: palette.green },
66892
+ "hljs-char-escape": { color: palette.magenta },
66893
+ "hljs-character": { color: palette.green },
66894
+ "hljs-class": { color: palette.blue1 },
66895
+ "hljs-class-title": { color: palette.blue1 },
66896
+ "hljs-code": { color: palette.green },
66897
+ "hljs-comment": {
66898
+ color: palette.comment,
66899
+ fontStyle: "italic"
66900
+ },
66901
+ "hljs-computation-expression": { color: palette.cyan },
66902
+ "hljs-deletion": { background: palette.diff.delete },
66903
+ "hljs-doctag": { color: palette.yellow },
66904
+ "hljs-emphasis": { fontStyle: "italic" },
66905
+ "hljs-function": { color: palette.blue },
66906
+ "hljs-function-dispatch": { color: palette.blue },
66907
+ "hljs-keyword": {
66908
+ color: palette.magenta,
66909
+ fontStyle: "italic"
66910
+ },
66911
+ "hljs-label": { color: palette.blue },
66912
+ "hljs-link": { color: palette.teal },
66913
+ "hljs-literal": { color: palette.orange },
66914
+ "hljs-message-name": { color: palette.blue },
66915
+ "hljs-meta": { color: palette.cyan },
66916
+ "hljs-meta-prompt": { color: palette.fg_dark },
66917
+ "hljs-name": { color: palette.magenta },
66918
+ "hljs-named-character": { color: palette.blue1 },
66919
+ "hljs-number": { color: palette.orange },
66920
+ "hljs-operator": { color: palette.blue5 },
66921
+ "hljs-params": { color: palette.yellow },
66922
+ "hljs-property": { color: palette.green1 },
66923
+ "hljs-punctuation": { color: palette.fg_dark },
66924
+ "hljs-quote": {
66925
+ color: palette.comment,
66926
+ fontStyle: "italic"
66927
+ },
66928
+ "hljs-regex": { color: palette.blue6 },
66929
+ "hljs-regexp": { color: palette.blue6 },
66930
+ "hljs-rest_arg": {
66931
+ color: interpolateColor(palette.yellow, palette.fg, 0.8)
66932
+ },
66933
+ "hljs-section": {
66934
+ color: palette.blue,
66935
+ fontWeight: "bold"
66936
+ },
66937
+ "hljs-selector-attr": { color: palette.cyan },
66938
+ "hljs-selector-class": { color: palette.green1 },
66939
+ "hljs-selector-id": { color: palette.green1 },
66940
+ "hljs-selector-pseudo": { color: palette.cyan },
66941
+ "hljs-selector-tag": { color: palette.magenta },
66942
+ "hljs-string": { color: palette.green },
66943
+ "hljs-strong": { fontWeight: "bold" },
66944
+ "hljs-subst": { color: palette.blue5 },
66945
+ "hljs-symbol": { color: palette.magenta },
66946
+ "hljs-tag": { color: palette.blue1 },
66947
+ "hljs-template-tag": { color: palette.blue5 },
66948
+ "hljs-template-variable": { color: palette.fg },
66949
+ "hljs-title": { color: palette.blue },
66950
+ "hljs-title-class": { color: palette.blue1 },
66951
+ "hljs-title-class-inherited": { color: palette.blue1 },
66952
+ "hljs-title-function": { color: palette.blue },
66953
+ "hljs-title-function-invoke": { color: palette.blue },
66954
+ "hljs-type": { color: palette.blue1 },
66955
+ "hljs-variable": { color: palette.fg },
66956
+ "hljs-variable-constant": { color: palette.orange },
66957
+ "hljs-variable-language": { color: palette.red }
66958
+ },
66959
+ tokyoNightColors
66960
+ );
66961
+
66647
66962
  // packages/cli/src/ui/themes/theme-manager.ts
66648
66963
  import * as fs13 from "node:fs";
66649
66964
  import * as path6 from "node:path";
@@ -67143,6 +67458,7 @@ var ThemeManager = class {
67143
67458
  SolarizedDark,
67144
67459
  SolarizedLight,
67145
67460
  XCode,
67461
+ TokyoNight,
67146
67462
  ANSI,
67147
67463
  ANSILight
67148
67464
  ];
@@ -68116,8 +68432,8 @@ function getInstallationInfo(projectRoot, isAutoUpdateEnabled) {
68116
68432
  }
68117
68433
 
68118
68434
  // packages/cli/src/utils/updateEventEmitter.ts
68119
- import { EventEmitter as EventEmitter4 } from "node:events";
68120
- var updateEventEmitter = new EventEmitter4();
68435
+ import { EventEmitter as EventEmitter3 } from "node:events";
68436
+ var updateEventEmitter = new EventEmitter3();
68121
68437
 
68122
68438
  // packages/cli/src/utils/spawnWrapper.ts
68123
68439
  import { spawn } from "node:child_process";
@@ -68179,12 +68495,19 @@ Automatic update is not available in sandbox mode.`
68179
68495
  combinedMessage += `
68180
68496
  ${installationInfo.updateMessage}`;
68181
68497
  }
68182
- updateEventEmitter.emit("update-received", {
68183
- message: combinedMessage
68184
- });
68185
68498
  if (!installationInfo.updateCommand || !settings.merged.general.enableAutoUpdate) {
68499
+ updateEventEmitter.emit("update-received", {
68500
+ ...info,
68501
+ message: combinedMessage,
68502
+ isUpdating: false
68503
+ });
68186
68504
  return;
68187
68505
  }
68506
+ updateEventEmitter.emit("update-received", {
68507
+ ...info,
68508
+ message: combinedMessage,
68509
+ isUpdating: true
68510
+ });
68188
68511
  if (_updateInProgress) {
68189
68512
  return;
68190
68513
  }
@@ -75468,7 +75791,7 @@ var incrementMaxListeners = (eventEmitter, maxListenersIncrement, signal) => {
75468
75791
  };
75469
75792
 
75470
75793
  // packages/cli/node_modules/execa/lib/ipc/forward.js
75471
- import { EventEmitter as EventEmitter5 } from "node:events";
75794
+ import { EventEmitter as EventEmitter4 } from "node:events";
75472
75795
 
75473
75796
  // packages/cli/node_modules/execa/lib/ipc/incoming.js
75474
75797
  import { once as once2 } from "node:events";
@@ -75550,7 +75873,7 @@ var getIpcEmitter = (anyProcess, channel, isSubprocess) => {
75550
75873
  if (IPC_EMITTERS.has(anyProcess)) {
75551
75874
  return IPC_EMITTERS.get(anyProcess);
75552
75875
  }
75553
- const ipcEmitter = new EventEmitter5();
75876
+ const ipcEmitter = new EventEmitter4();
75554
75877
  ipcEmitter.connected = true;
75555
75878
  IPC_EMITTERS.set(anyProcess, ipcEmitter);
75556
75879
  forwardEvents({
@@ -80245,6 +80568,7 @@ var parseSlashCommand = (query, commands) => {
80245
80568
  let commandToExecute;
80246
80569
  let pathIndex = 0;
80247
80570
  const canonicalPath = [];
80571
+ let parentCommand;
80248
80572
  for (const part of commandPath) {
80249
80573
  let foundCommand = currentCommands.find((cmd) => cmd.name === part);
80250
80574
  if (!foundCommand) {
@@ -80253,6 +80577,7 @@ var parseSlashCommand = (query, commands) => {
80253
80577
  );
80254
80578
  }
80255
80579
  if (foundCommand) {
80580
+ parentCommand = commandToExecute;
80256
80581
  commandToExecute = foundCommand;
80257
80582
  canonicalPath.push(foundCommand.name);
80258
80583
  pathIndex++;
@@ -80266,6 +80591,13 @@ var parseSlashCommand = (query, commands) => {
80266
80591
  }
80267
80592
  }
80268
80593
  const args = parts.slice(pathIndex).join(" ");
80594
+ if (commandToExecute && commandToExecute.takesArgs === false && args.length > 0 && parentCommand && parentCommand.action) {
80595
+ return {
80596
+ commandToExecute: parentCommand,
80597
+ args: parts.slice(pathIndex - 1).join(" "),
80598
+ canonicalPath: canonicalPath.slice(0, -1)
80599
+ };
80600
+ }
80269
80601
  return { commandToExecute, args, canonicalPath };
80270
80602
  };
80271
80603
 
@@ -85262,11 +85594,11 @@ var useSessionBrowser = (config, onLoadHistory) => {
85262
85594
  * Deletes a session by ID using the ChatRecordingService.
85263
85595
  */
85264
85596
  handleDeleteSession: (0, import_react41.useCallback)(
85265
- (session) => {
85597
+ async (session) => {
85266
85598
  try {
85267
85599
  const chatRecordingService = config.getGeminiClient()?.getChatRecordingService();
85268
85600
  if (chatRecordingService) {
85269
- chatRecordingService.deleteSession(session.file);
85601
+ await chatRecordingService.deleteSession(session.file);
85270
85602
  }
85271
85603
  } catch (error) {
85272
85604
  coreEvents.emitFeedback("error", "Error deleting session:", error);
@@ -87723,7 +88055,7 @@ var authCommand = {
87723
88055
  import process34 from "node:process";
87724
88056
 
87725
88057
  // packages/cli/src/generated/git-commit.ts
87726
- var GIT_COMMIT_INFO = "b6d9970af";
88058
+ var GIT_COMMIT_INFO = "24810f97e";
87727
88059
 
87728
88060
  // packages/cli/src/ui/utils/historyExportUtils.ts
87729
88061
  import * as fsPromises2 from "node:fs/promises";
@@ -87922,6 +88254,7 @@ var listCommand = {
87922
88254
  description: "List saved manual conversation checkpoints",
87923
88255
  kind: "built-in" /* BUILT_IN */,
87924
88256
  autoExecute: true,
88257
+ takesArgs: false,
87925
88258
  action: async (context) => {
87926
88259
  const chatDetails = await getSavedChatTags(context, false);
87927
88260
  const item = {
@@ -88208,10 +88541,18 @@ var chatCommand = {
88208
88541
  description: "Browse auto-saved conversations and manage chat checkpoints",
88209
88542
  kind: "built-in" /* BUILT_IN */,
88210
88543
  autoExecute: true,
88211
- action: async () => ({
88212
- type: "dialog",
88213
- dialog: "sessionBrowser"
88214
- }),
88544
+ action: async (context, args) => {
88545
+ if (args) {
88546
+ const parsed = parseSlashCommand(`/${args}`, chatResumeSubCommands);
88547
+ if (parsed.commandToExecute?.action) {
88548
+ return parsed.commandToExecute.action(context, parsed.args);
88549
+ }
88550
+ }
88551
+ return {
88552
+ type: "dialog",
88553
+ dialog: "sessionBrowser"
88554
+ };
88555
+ },
88215
88556
  subCommands: chatResumeSubCommands
88216
88557
  };
88217
88558
 
@@ -88237,6 +88578,7 @@ var clearCommand = {
88237
88578
  }
88238
88579
  if (geminiClient) {
88239
88580
  context.ui.setDebugMessage("Clearing terminal and resetting chat.");
88581
+ await resetBrowserSession();
88240
88582
  await geminiClient.resetChat();
88241
88583
  } else {
88242
88584
  context.ui.setDebugMessage("Clearing terminal.");
@@ -89414,7 +89756,9 @@ function ExtensionDetails({
89414
89756
  onBack,
89415
89757
  onInstall,
89416
89758
  onLink,
89417
- isInstalled
89759
+ isInstalled,
89760
+ updateState,
89761
+ onUpdate
89418
89762
  }) {
89419
89763
  const keyMatchers = useKeyMatchers();
89420
89764
  const [consentRequest, setConsentRequest] = (0, import_react55.useState)(null);
@@ -89449,7 +89793,7 @@ function ExtensionDetails({
89449
89793
  );
89450
89794
  return true;
89451
89795
  }
89452
- if (key.name === "l" && isLinkable && !isInstalled && !isInstalling) {
89796
+ if (keyMatchers["extension.link" /* LINK_EXTENSION */](key) && isLinkable && !isInstalled && !isInstalling) {
89453
89797
  setIsInstalling(true);
89454
89798
  void onLink(
89455
89799
  (prompt) => new Promise((resolve9) => {
@@ -89458,6 +89802,10 @@ function ExtensionDetails({
89458
89802
  );
89459
89803
  return true;
89460
89804
  }
89805
+ if (keyMatchers["extension.update" /* UPDATE_EXTENSION */](key) && updateState === "update available" /* UPDATE_AVAILABLE */ && !isInstalling) {
89806
+ void onUpdate?.();
89807
+ return true;
89808
+ }
89461
89809
  return false;
89462
89810
  },
89463
89811
  { isActive: true, priority: true }
@@ -89521,7 +89869,9 @@ function ExtensionDetails({
89521
89869
  ">",
89522
89870
  " "
89523
89871
  ] }),
89524
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.text.primary, bold: true, children: extension.extensionName })
89872
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.text.primary, bold: true, children: extension.extensionName }),
89873
+ 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" }) }),
89874
+ 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
89875
  ] }),
89526
89876
  /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "row", children: [
89527
89877
  /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Text, { color: theme.text.secondary, children: [
@@ -89602,7 +89952,7 @@ function ExtensionDetails({
89602
89952
  ]
89603
89953
  }
89604
89954
  ),
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" }) })
89955
+ 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
89956
  ]
89607
89957
  }
89608
89958
  );
@@ -89621,11 +89971,11 @@ function ExtensionRegistryView({
89621
89971
  "",
89622
89972
  config.getExtensionRegistryURI()
89623
89973
  );
89624
- const { terminalHeight, staticExtraHeight } = useUIState();
89974
+ const { terminalHeight, staticExtraHeight, historyManager } = useUIState();
89625
89975
  const [selectedExtension, setSelectedExtension] = (0, import_react56.useState)(null);
89626
- const { extensionsUpdateState } = useExtensionUpdates(
89976
+ const { extensionsUpdateState, dispatchExtensionStateUpdate } = useExtensionUpdates(
89627
89977
  extensionManager,
89628
- () => 0,
89978
+ historyManager.addItem,
89629
89979
  config.getEnableExtensionReloading()
89630
89980
  );
89631
89981
  const [installedExtensions, setInstalledExtensions] = (0, import_react56.useState)(
@@ -89662,6 +90012,21 @@ function ExtensionRegistryView({
89662
90012
  },
89663
90013
  [onLink, extensionManager]
89664
90014
  );
90015
+ const handleUpdate = (0, import_react56.useCallback)(
90016
+ async (extension) => {
90017
+ dispatchExtensionStateUpdate({
90018
+ type: "SCHEDULE_UPDATE",
90019
+ payload: {
90020
+ all: false,
90021
+ names: [extension.extensionName],
90022
+ onComplete: () => {
90023
+ setInstalledExtensions(extensionManager.getExtensions());
90024
+ }
90025
+ }
90026
+ });
90027
+ },
90028
+ [dispatchExtensionStateUpdate, extensionManager]
90029
+ );
89665
90030
  const renderItem = (0, import_react56.useCallback)(
89666
90031
  (item, isActive, _labelWidth) => {
89667
90032
  const isInstalled = installedExtensions.some(
@@ -89670,7 +90035,6 @@ function ExtensionRegistryView({
89670
90035
  const updateState = extensionsUpdateState.get(
89671
90036
  item.extension.extensionName
89672
90037
  );
89673
- const hasUpdate = updateState === "update available" /* UPDATE_AVAILABLE */;
89674
90038
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Box_default, { flexDirection: "row", width: "100%", justifyContent: "space-between", children: [
89675
90039
  /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Box_default, { flexDirection: "row", flexShrink: 1, minWidth: 0, children: [
89676
90040
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { width: 2, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
@@ -89689,8 +90053,7 @@ function ExtensionRegistryView({
89689
90053
  }
89690
90054
  ) }),
89691
90055
  /* @__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]" }) }),
90056
+ 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
90057
  /* @__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
90058
  ] }),
89696
90059
  /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Box_default, { flexShrink: 0, marginLeft: 2, width: 8, flexDirection: "row", children: [
@@ -89790,7 +90153,13 @@ function ExtensionRegistryView({
89790
90153
  },
89791
90154
  isInstalled: installedExtensions.some(
89792
90155
  (e) => e.name === selectedExtension.extensionName
89793
- )
90156
+ ),
90157
+ updateState: extensionsUpdateState.get(
90158
+ selectedExtension.extensionName
90159
+ ),
90160
+ onUpdate: async () => {
90161
+ await handleUpdate(selectedExtension);
90162
+ }
89794
90163
  }
89795
90164
  )
89796
90165
  ] });
@@ -90405,6 +90774,7 @@ var listExtensionsCommand = {
90405
90774
  description: "List active extensions",
90406
90775
  kind: "built-in" /* BUILT_IN */,
90407
90776
  autoExecute: true,
90777
+ takesArgs: false,
90408
90778
  action: listAction2
90409
90779
  };
90410
90780
  var updateExtensionsCommand = {
@@ -90458,6 +90828,7 @@ var exploreExtensionsCommand = {
90458
90828
  description: "Open extensions page in your browser",
90459
90829
  kind: "built-in" /* BUILT_IN */,
90460
90830
  autoExecute: true,
90831
+ takesArgs: false,
90461
90832
  action: exploreAction
90462
90833
  };
90463
90834
  var reloadCommand = {
@@ -90485,26 +90856,35 @@ function extensionsCommand(enableExtensionReloading) {
90485
90856
  linkCommand,
90486
90857
  configCommand2
90487
90858
  ] : [];
90859
+ const subCommands = [
90860
+ listExtensionsCommand,
90861
+ updateExtensionsCommand,
90862
+ exploreExtensionsCommand,
90863
+ reloadCommand,
90864
+ ...conditionalCommands
90865
+ ];
90488
90866
  return {
90489
90867
  name: "extensions",
90490
90868
  description: "Manage extensions",
90491
90869
  kind: "built-in" /* BUILT_IN */,
90492
90870
  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
- )
90871
+ subCommands,
90872
+ action: async (context, args) => {
90873
+ if (args) {
90874
+ const parsed = parseSlashCommand(`/${args}`, subCommands);
90875
+ if (parsed.commandToExecute?.action) {
90876
+ return parsed.commandToExecute.action(context, parsed.args);
90877
+ }
90878
+ }
90879
+ return listExtensionsCommand.action(context, args);
90880
+ }
90504
90881
  };
90505
90882
  }
90506
90883
 
90507
90884
  // packages/cli/src/ui/components/FooterConfigDialog.tsx
90885
+ var import_react60 = __toESM(require_react(), 1);
90886
+
90887
+ // packages/cli/src/ui/components/Footer.tsx
90508
90888
  var import_react59 = __toESM(require_react(), 1);
90509
90889
 
90510
90890
  // packages/cli/src/ui/components/ConsoleSummaryDisplay.tsx
@@ -90534,12 +90914,13 @@ import process38 from "node:process";
90534
90914
  var import_react58 = __toESM(require_react(), 1);
90535
90915
  import process37 from "node:process";
90536
90916
  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
90537
- var MemoryUsageDisplay = ({
90538
- color = theme.text.primary
90539
- }) => {
90917
+ var MemoryUsageDisplay = ({ color = theme.text.primary, isActive = true }) => {
90540
90918
  const [memoryUsage, setMemoryUsage] = (0, import_react58.useState)("");
90541
90919
  const [memoryUsageColor, setMemoryUsageColor] = (0, import_react58.useState)(color);
90542
90920
  (0, import_react58.useEffect)(() => {
90921
+ if (!isActive) {
90922
+ return;
90923
+ }
90543
90924
  const updateMemory = () => {
90544
90925
  const usage = process37.memoryUsage().rss;
90545
90926
  setMemoryUsage(formatBytes(usage));
@@ -90550,7 +90931,7 @@ var MemoryUsageDisplay = ({
90550
90931
  const intervalId = setInterval(updateMemory, 2e3);
90551
90932
  updateMemory();
90552
90933
  return () => clearInterval(intervalId);
90553
- }, [color]);
90934
+ }, [color, isActive]);
90554
90935
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { color: memoryUsageColor, children: memoryUsage }) });
90555
90936
  };
90556
90937
 
@@ -90700,6 +91081,11 @@ var ALL_ITEMS = [
90700
91081
  header: "session",
90701
91082
  description: "Unique identifier for the current session"
90702
91083
  },
91084
+ {
91085
+ id: "auth",
91086
+ header: "/auth",
91087
+ description: "Current authentication info"
91088
+ },
90703
91089
  {
90704
91090
  id: "code-changes",
90705
91091
  header: "diff",
@@ -90720,6 +91106,7 @@ var DEFAULT_ORDER = [
90720
91106
  "quota",
90721
91107
  "memory-usage",
90722
91108
  "session-id",
91109
+ "auth",
90723
91110
  "code-changes",
90724
91111
  "token-count"
90725
91112
  ];
@@ -90753,8 +91140,12 @@ function deriveItemsFromLegacySettings(settings) {
90753
91140
  }
90754
91141
  var VALID_IDS = new Set(ALL_ITEMS.map((i) => i.id));
90755
91142
  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));
91143
+ const showUserIdentity = settings.ui?.showUserIdentity !== false;
91144
+ const filteredValidIds = showUserIdentity ? VALID_IDS : new Set([...VALID_IDS].filter((id) => id !== "auth"));
91145
+ const source = (settings.ui?.footer?.items ?? deriveItemsFromLegacySettings(settings)).filter((id) => filteredValidIds.has(id));
91146
+ const others = DEFAULT_ORDER.filter(
91147
+ (id) => !source.includes(id) && filteredValidIds.has(id)
91148
+ );
90758
91149
  return {
90759
91150
  orderedIds: [...source, ...others],
90760
91151
  selectedIds: new Set(source)
@@ -90857,11 +91248,26 @@ var FooterRow = ({ items, showLabels }) => {
90857
91248
  function isFooterItemId(id) {
90858
91249
  return ALL_ITEMS.some((i) => i.id === id);
90859
91250
  }
90860
- var Footer = () => {
91251
+ var Footer = ({
91252
+ copyModeEnabled = false
91253
+ }) => {
90861
91254
  const uiState = useUIState();
90862
91255
  const config = useConfig();
90863
91256
  const settings = useSettings();
90864
91257
  const { vimEnabled, vimMode } = useVimMode();
91258
+ const authType = config.getContentGeneratorConfig()?.authType;
91259
+ const [email, setEmail] = (0, import_react59.useState)();
91260
+ (0, import_react59.useEffect)(() => {
91261
+ if (authType) {
91262
+ const userAccountManager = new UserAccountManager();
91263
+ setEmail(userAccountManager.getCachedGoogleAccount() ?? void 0);
91264
+ } else {
91265
+ setEmail(void 0);
91266
+ }
91267
+ }, [authType]);
91268
+ if (copyModeEnabled) {
91269
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { height: 1 });
91270
+ }
90865
91271
  const {
90866
91272
  model,
90867
91273
  targetDir,
@@ -91019,7 +91425,18 @@ var Footer = () => {
91019
91425
  break;
91020
91426
  }
91021
91427
  case "memory-usage": {
91022
- addCol(id, header, () => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MemoryUsageDisplay, { color: itemColor }), 10);
91428
+ addCol(
91429
+ id,
91430
+ header,
91431
+ () => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
91432
+ MemoryUsageDisplay,
91433
+ {
91434
+ color: itemColor,
91435
+ isActive: !uiState.copyModeEnabled
91436
+ }
91437
+ ),
91438
+ 10
91439
+ );
91023
91440
  break;
91024
91441
  }
91025
91442
  case "session-id": {
@@ -91031,6 +91448,18 @@ var Footer = () => {
91031
91448
  );
91032
91449
  break;
91033
91450
  }
91451
+ case "auth": {
91452
+ if (!settings.merged.ui.showUserIdentity) break;
91453
+ if (!authType) break;
91454
+ const displayStr = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? email ?? "google" : authType;
91455
+ addCol(
91456
+ id,
91457
+ header,
91458
+ () => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: itemColor, wrap: "truncate-end", children: displayStr }),
91459
+ displayStr.length
91460
+ );
91461
+ break;
91462
+ }
91034
91463
  case "code-changes": {
91035
91464
  const added = uiState.sessionStats.metrics.files.totalLinesAdded;
91036
91465
  const removed = uiState.sessionStats.metrics.files.totalLinesRemoved;
@@ -91178,14 +91607,14 @@ var FooterConfigDialog = ({
91178
91607
  const keyMatchers = useKeyMatchers();
91179
91608
  const { settings, setSetting } = useSettingsStore();
91180
91609
  const { constrainHeight, terminalHeight, staticExtraHeight } = useUIState();
91181
- const [state, dispatch] = (0, import_react59.useReducer)(
91610
+ const [state, dispatch] = (0, import_react60.useReducer)(
91182
91611
  footerConfigReducer,
91183
91612
  void 0,
91184
91613
  () => resolveFooterState(settings.merged)
91185
91614
  );
91186
91615
  const { orderedIds, selectedIds } = state;
91187
- const [focusKey, setFocusKey] = (0, import_react59.useState)(orderedIds[0]);
91188
- const listItems = (0, import_react59.useMemo)(() => {
91616
+ const [focusKey, setFocusKey] = (0, import_react60.useState)(orderedIds[0]);
91617
+ const listItems = (0, import_react60.useMemo)(() => {
91189
91618
  const items = orderedIds.map((id) => {
91190
91619
  const item = ALL_ITEMS.find((i) => i.id === id);
91191
91620
  if (!item) return null;
@@ -91220,7 +91649,7 @@ var FooterConfigDialog = ({
91220
91649
  });
91221
91650
  return items;
91222
91651
  }, [orderedIds]);
91223
- const handleSaveAndClose = (0, import_react59.useCallback)(() => {
91652
+ const handleSaveAndClose = (0, import_react60.useCallback)(() => {
91224
91653
  const finalItems = orderedIds.filter((id) => selectedIds.has(id));
91225
91654
  const currentSetting = settings.merged.ui?.footer?.items;
91226
91655
  if (JSON.stringify(finalItems) !== JSON.stringify(currentSetting)) {
@@ -91234,17 +91663,17 @@ var FooterConfigDialog = ({
91234
91663
  settings.merged.ui?.footer?.items,
91235
91664
  onClose
91236
91665
  ]);
91237
- const handleResetToDefaults = (0, import_react59.useCallback)(() => {
91666
+ const handleResetToDefaults = (0, import_react60.useCallback)(() => {
91238
91667
  setSetting("User" /* User */, "ui.footer.items", void 0);
91239
91668
  const newState = resolveFooterState(settings.merged);
91240
91669
  dispatch({ type: "SET_STATE", payload: newState });
91241
91670
  setFocusKey(newState.orderedIds[0]);
91242
91671
  }, [setSetting, settings.merged]);
91243
- const handleToggleLabels = (0, import_react59.useCallback)(() => {
91672
+ const handleToggleLabels = (0, import_react60.useCallback)(() => {
91244
91673
  const current = settings.merged.ui.footer.showLabels !== false;
91245
91674
  setSetting("User" /* User */, "ui.footer.showLabels", !current);
91246
91675
  }, [setSetting, settings.merged.ui.footer.showLabels]);
91247
- const handleSelect = (0, import_react59.useCallback)(
91676
+ const handleSelect = (0, import_react60.useCallback)(
91248
91677
  (item) => {
91249
91678
  if (item.type === "config") {
91250
91679
  dispatch({ type: "TOGGLE_ITEM", id: item.id });
@@ -91256,7 +91685,7 @@ var FooterConfigDialog = ({
91256
91685
  },
91257
91686
  [handleResetToDefaults, handleToggleLabels]
91258
91687
  );
91259
- const handleHighlight = (0, import_react59.useCallback)((item) => {
91688
+ const handleHighlight = (0, import_react60.useCallback)((item) => {
91260
91689
  setFocusKey(item.key);
91261
91690
  }, []);
91262
91691
  useKeypress(
@@ -91282,7 +91711,7 @@ var FooterConfigDialog = ({
91282
91711
  { isActive: true, priority: true }
91283
91712
  );
91284
91713
  const showLabels = settings.merged.ui.footer.showLabels !== false;
91285
- const previewContent = (0, import_react59.useMemo)(() => {
91714
+ const previewContent = (0, import_react60.useMemo)(() => {
91286
91715
  if (focusKey === "reset") {
91287
91716
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: theme.ui.comment, italic: true, children: "Default footer (uses legacy settings)" });
91288
91717
  }
@@ -91306,6 +91735,7 @@ var FooterConfigDialog = ({
91306
91735
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: getColor("code-changes"), children: " " }),
91307
91736
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: getColor("code-changes", theme.status.error), children: "-4" })
91308
91737
  ] }),
91738
+ auth: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: getColor("auth", itemColor), children: "test@example.com" }),
91309
91739
  "token-count": /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: getColor("token-count", itemColor), children: "1.5k tokens" })
91310
91740
  };
91311
91741
  const rowItems = itemsToPreview.filter((id) => mockData[id]).map((id) => ({
@@ -91463,10 +91893,10 @@ var shortcutsCommand = {
91463
91893
  };
91464
91894
 
91465
91895
  // packages/cli/src/ui/components/RewindViewer.tsx
91466
- var import_react62 = __toESM(require_react(), 1);
91896
+ var import_react63 = __toESM(require_react(), 1);
91467
91897
 
91468
91898
  // packages/cli/src/ui/hooks/useRewind.ts
91469
- var import_react60 = __toESM(require_react(), 1);
91899
+ var import_react61 = __toESM(require_react(), 1);
91470
91900
 
91471
91901
  // packages/cli/src/ui/utils/rewindFileOps.ts
91472
91902
  import fs38 from "node:fs/promises";
@@ -91619,15 +92049,15 @@ async function revertFileChanges(conversation, targetMessageId) {
91619
92049
 
91620
92050
  // packages/cli/src/ui/hooks/useRewind.ts
91621
92051
  function useRewind(conversation) {
91622
- const [selectedMessageId, setSelectedMessageId] = (0, import_react60.useState)(
92052
+ const [selectedMessageId, setSelectedMessageId] = (0, import_react61.useState)(
91623
92053
  null
91624
92054
  );
91625
- const [confirmationStats, setConfirmationStats] = (0, import_react60.useState)(null);
91626
- const getStats = (0, import_react60.useCallback)(
92055
+ const [confirmationStats, setConfirmationStats] = (0, import_react61.useState)(null);
92056
+ const getStats = (0, import_react61.useCallback)(
91627
92057
  (userMessage) => calculateTurnStats(conversation, userMessage),
91628
92058
  [conversation]
91629
92059
  );
91630
- const selectMessage = (0, import_react60.useCallback)(
92060
+ const selectMessage = (0, import_react61.useCallback)(
91631
92061
  (messageId) => {
91632
92062
  const msg = conversation.messages.find((m2) => m2.id === messageId);
91633
92063
  if (msg) {
@@ -91637,7 +92067,7 @@ function useRewind(conversation) {
91637
92067
  },
91638
92068
  [conversation]
91639
92069
  );
91640
- const clearSelection = (0, import_react60.useCallback)(() => {
92070
+ const clearSelection = (0, import_react61.useCallback)(() => {
91641
92071
  setSelectedMessageId(null);
91642
92072
  setConfirmationStats(null);
91643
92073
  }, []);
@@ -91651,7 +92081,7 @@ function useRewind(conversation) {
91651
92081
  }
91652
92082
 
91653
92083
  // packages/cli/src/ui/components/RewindConfirmation.tsx
91654
- var import_react61 = __toESM(require_react(), 1);
92084
+ var import_react62 = __toESM(require_react(), 1);
91655
92085
  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
91656
92086
  var REWIND_OPTIONS = [
91657
92087
  {
@@ -91696,7 +92126,7 @@ var RewindConfirmation = ({
91696
92126
  const handleSelect = (outcome) => {
91697
92127
  onConfirm(outcome);
91698
92128
  };
91699
- const options = (0, import_react61.useMemo)(() => {
92129
+ const options = (0, import_react62.useMemo)(() => {
91700
92130
  if (stats) {
91701
92131
  return REWIND_OPTIONS;
91702
92132
  }
@@ -91823,7 +92253,7 @@ var RewindViewer = ({
91823
92253
  onRewind
91824
92254
  }) => {
91825
92255
  const keyMatchers = useKeyMatchers();
91826
- const [isRewinding, setIsRewinding] = (0, import_react62.useState)(false);
92256
+ const [isRewinding, setIsRewinding] = (0, import_react63.useState)(false);
91827
92257
  const { terminalWidth, terminalHeight } = useUIState();
91828
92258
  const isScreenReaderEnabled = use_is_screen_reader_enabled_default();
91829
92259
  const {
@@ -91833,15 +92263,15 @@ var RewindViewer = ({
91833
92263
  selectMessage,
91834
92264
  clearSelection
91835
92265
  } = useRewind(conversation);
91836
- const [highlightedMessageId, setHighlightedMessageId] = (0, import_react62.useState)(null);
91837
- const [expandedMessageId, setExpandedMessageId] = (0, import_react62.useState)(
92266
+ const [highlightedMessageId, setHighlightedMessageId] = (0, import_react63.useState)(null);
92267
+ const [expandedMessageId, setExpandedMessageId] = (0, import_react63.useState)(
91838
92268
  null
91839
92269
  );
91840
- const interactions = (0, import_react62.useMemo)(
92270
+ const interactions = (0, import_react63.useMemo)(
91841
92271
  () => conversation.messages.filter((msg) => msg.type === "user"),
91842
92272
  [conversation.messages]
91843
92273
  );
91844
- const items = (0, import_react62.useMemo)(() => {
92274
+ const items = (0, import_react63.useMemo)(() => {
91845
92275
  const interactionItems = interactions.map((msg, idx) => ({
91846
92276
  key: `${msg.id || "msg"}-${idx}`,
91847
92277
  value: msg,
@@ -92197,7 +92627,7 @@ var rewindCommand = {
92197
92627
  };
92198
92628
 
92199
92629
  // packages/cli/src/ui/commands/hooksCommand.ts
92200
- var import_react64 = __toESM(require_react(), 1);
92630
+ var import_react65 = __toESM(require_react(), 1);
92201
92631
 
92202
92632
  // packages/cli/src/utils/hookSettings.ts
92203
92633
  function enableHook(settings, hookName) {
@@ -92335,7 +92765,7 @@ function renderHookActionFeedback(result, formatScope) {
92335
92765
  }
92336
92766
 
92337
92767
  // packages/cli/src/ui/components/HooksDialog.tsx
92338
- var import_react63 = __toESM(require_react(), 1);
92768
+ var import_react64 = __toESM(require_react(), 1);
92339
92769
  var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
92340
92770
  var DEFAULT_MAX_VISIBLE_HOOKS = 8;
92341
92771
  var HooksDialog = ({
@@ -92344,8 +92774,8 @@ var HooksDialog = ({
92344
92774
  maxVisibleHooks = DEFAULT_MAX_VISIBLE_HOOKS
92345
92775
  }) => {
92346
92776
  const keyMatchers = useKeyMatchers();
92347
- const [scrollOffset, setScrollOffset] = (0, import_react63.useState)(0);
92348
- const flattenedHooks = (0, import_react63.useMemo)(() => {
92777
+ const [scrollOffset, setScrollOffset] = (0, import_react64.useState)(0);
92778
+ const flattenedHooks = (0, import_react64.useMemo)(() => {
92349
92779
  const result = [];
92350
92780
  const hooksByEvent = hooks.reduce(
92351
92781
  (acc, hook) => {
@@ -92489,7 +92919,7 @@ function panelAction(context) {
92489
92919
  const allHooks = hookSystem?.getAllHooks() || [];
92490
92920
  return {
92491
92921
  type: "custom_dialog",
92492
- component: (0, import_react64.createElement)(HooksDialog, {
92922
+ component: (0, import_react65.createElement)(HooksDialog, {
92493
92923
  hooks: allHooks,
92494
92924
  onClose: () => context.ui.removeComponent()
92495
92925
  })
@@ -93124,7 +93554,7 @@ Use /mcp auth <server-name> to authenticate.`
93124
93554
  type: "info",
93125
93555
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
93126
93556
  });
93127
- const { MCPOAuthProvider } = await import("./core-6V2OYDRU.js");
93557
+ const { MCPOAuthProvider } = await import("./core-RMRIZ3E5.js");
93128
93558
  let oauthConfig = server.oauth;
93129
93559
  if (!oauthConfig) {
93130
93560
  oauthConfig = { enabled: false };
@@ -93174,7 +93604,7 @@ Use /mcp auth <server-name> to authenticate.`
93174
93604
  );
93175
93605
  }
93176
93606
  };
93177
- var listAction3 = async (context, showDescriptions = false, showSchema = false) => {
93607
+ var listAction3 = async (context, showDescriptions = false, showSchema = false, serverNameFilter) => {
93178
93608
  const agentContext = context.services.agentContext;
93179
93609
  const config = agentContext?.config;
93180
93610
  if (!config) {
@@ -93193,9 +93623,19 @@ var listAction3 = async (context, showDescriptions = false, showSchema = false)
93193
93623
  content: "Could not retrieve tool registry."
93194
93624
  };
93195
93625
  }
93196
- const mcpServers = config.getMcpClientManager()?.getMcpServers() || {};
93197
- const serverNames = Object.keys(mcpServers);
93626
+ let mcpServers = config.getMcpClientManager()?.getMcpServers() || {};
93198
93627
  const blockedMcpServers = config.getMcpClientManager()?.getBlockedMcpServers() || [];
93628
+ if (serverNameFilter) {
93629
+ const filter = serverNameFilter.trim().toLowerCase();
93630
+ if (filter) {
93631
+ mcpServers = Object.fromEntries(
93632
+ Object.entries(mcpServers).filter(
93633
+ ([name]) => name.toLowerCase().includes(filter) || normalizeServerId(name).includes(filter)
93634
+ )
93635
+ );
93636
+ }
93637
+ }
93638
+ const serverNames = Object.keys(mcpServers);
93199
93639
  const connectingServers = serverNames.filter(
93200
93640
  (name) => getMCPServerStatus(name) === "connecting" /* CONNECTING */
93201
93641
  );
@@ -93281,7 +93721,7 @@ var listCommand2 = {
93281
93721
  description: "List configured MCP servers and tools",
93282
93722
  kind: "built-in" /* BUILT_IN */,
93283
93723
  autoExecute: true,
93284
- action: (context) => listAction3(context)
93724
+ action: (context, args) => listAction3(context, false, false, args)
93285
93725
  };
93286
93726
  var descCommand = {
93287
93727
  name: "desc",
@@ -93289,14 +93729,14 @@ var descCommand = {
93289
93729
  description: "List configured MCP servers and tools with descriptions",
93290
93730
  kind: "built-in" /* BUILT_IN */,
93291
93731
  autoExecute: true,
93292
- action: (context) => listAction3(context, true)
93732
+ action: (context, args) => listAction3(context, true, false, args)
93293
93733
  };
93294
93734
  var schemaCommand = {
93295
93735
  name: "schema",
93296
93736
  description: "List configured MCP servers and tools with descriptions and schemas",
93297
93737
  kind: "built-in" /* BUILT_IN */,
93298
93738
  autoExecute: true,
93299
- action: (context) => listAction3(context, true, true)
93739
+ action: (context, args) => listAction3(context, true, true, args)
93300
93740
  };
93301
93741
  var reloadCommand2 = {
93302
93742
  name: "reload",
@@ -93304,6 +93744,7 @@ var reloadCommand2 = {
93304
93744
  description: "Reloads MCP servers",
93305
93745
  kind: "built-in" /* BUILT_IN */,
93306
93746
  autoExecute: true,
93747
+ takesArgs: false,
93307
93748
  action: async (context) => {
93308
93749
  const agentContext = context.services.agentContext;
93309
93750
  const config = agentContext?.config;
@@ -93464,7 +93905,16 @@ var mcpCommand = {
93464
93905
  enableCommand4,
93465
93906
  disableCommand4
93466
93907
  ],
93467
- action: async (context) => listAction3(context)
93908
+ action: async (context, args) => {
93909
+ if (args) {
93910
+ const parsed = parseSlashCommand(`/${args}`, mcpCommand.subCommands);
93911
+ if (parsed.commandToExecute?.action) {
93912
+ return parsed.commandToExecute.action(context, parsed.args);
93913
+ }
93914
+ return listAction3(context, false, false, args);
93915
+ }
93916
+ return listAction3(context);
93917
+ }
93468
93918
  };
93469
93919
 
93470
93920
  // packages/cli/src/ui/commands/memoryCommand.ts
@@ -93624,7 +94074,7 @@ var modelCommand = {
93624
94074
  };
93625
94075
 
93626
94076
  // packages/cli/src/ui/components/triage/TriageDuplicates.tsx
93627
- var import_react65 = __toESM(require_react(), 1);
94077
+ var import_react66 = __toESM(require_react(), 1);
93628
94078
  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
93629
94079
  var VISIBLE_LINES_COLLAPSED = 6;
93630
94080
  var VISIBLE_LINES_EXPANDED = 20;
@@ -93650,7 +94100,7 @@ var TriageDuplicates = ({
93650
94100
  initialLimit = 50
93651
94101
  }) => {
93652
94102
  const keyMatchers = useKeyMatchers();
93653
- const [state, setState] = (0, import_react65.useState)({
94103
+ const [state, setState] = (0, import_react66.useState)({
93654
94104
  status: "loading",
93655
94105
  issues: [],
93656
94106
  currentIndex: 0,
@@ -93658,18 +94108,18 @@ var TriageDuplicates = ({
93658
94108
  analyzingIds: /* @__PURE__ */ new Set(),
93659
94109
  message: "Fetching issues..."
93660
94110
  });
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)(
94111
+ const [focusSection, setFocusSection] = (0, import_react66.useState)("target");
94112
+ const [selectedCandidateIndex, setSelectedCandidateIndex] = (0, import_react66.useState)(0);
94113
+ const [targetExpanded, setTargetExpanded] = (0, import_react66.useState)(false);
94114
+ const [targetScrollOffset, setTargetScrollOffset] = (0, import_react66.useState)(0);
94115
+ const [candidateScrollOffset, setCandidateScrollOffset] = (0, import_react66.useState)(0);
94116
+ const [inputAction, setInputAction] = (0, import_react66.useState)("");
94117
+ const [processedHistory, setProcessedHistory] = (0, import_react66.useState)(
93668
94118
  []
93669
94119
  );
93670
- const [showHistory, setShowHistory] = (0, import_react65.useState)(false);
93671
- const [candidateListScrollOffset, setCandidateListScrollOffset] = (0, import_react65.useState)(0);
93672
- (0, import_react65.useEffect)(() => {
94120
+ const [showHistory, setShowHistory] = (0, import_react66.useState)(false);
94121
+ const [candidateListScrollOffset, setCandidateListScrollOffset] = (0, import_react66.useState)(0);
94122
+ (0, import_react66.useEffect)(() => {
93673
94123
  if (selectedCandidateIndex < candidateListScrollOffset) {
93674
94124
  setCandidateListScrollOffset(selectedCandidateIndex);
93675
94125
  } else if (selectedCandidateIndex >= candidateListScrollOffset + VISIBLE_CANDIDATES) {
@@ -93696,7 +94146,7 @@ var TriageDuplicates = ({
93696
94146
  return null;
93697
94147
  }
93698
94148
  };
93699
- const analyzeIssue = (0, import_react65.useCallback)(
94149
+ const analyzeIssue = (0, import_react66.useCallback)(
93700
94150
  async (issue) => {
93701
94151
  const dupComment = issue.comments.find(
93702
94152
  (c) => c.body.includes("Found possible duplicate issues:")
@@ -93837,7 +94287,7 @@ Return a JSON object with:
93837
94287
  },
93838
94288
  [config]
93839
94289
  );
93840
- (0, import_react65.useEffect)(() => {
94290
+ (0, import_react66.useEffect)(() => {
93841
94291
  if (state.issues.length === 0) return;
93842
94292
  const analyzeNext = async () => {
93843
94293
  const issuesToAnalyze = state.issues.slice(
@@ -93886,7 +94336,7 @@ Return a JSON object with:
93886
94336
  state.analyzingIds,
93887
94337
  analyzeIssue
93888
94338
  ]);
93889
- (0, import_react65.useEffect)(() => {
94339
+ (0, import_react66.useEffect)(() => {
93890
94340
  const issue = state.issues[state.currentIndex];
93891
94341
  if (!issue) return;
93892
94342
  const analysis = state.analysisCache.get(issue.number);
@@ -93922,7 +94372,7 @@ Return a JSON object with:
93922
94372
  state.analysisCache,
93923
94373
  state.analyzingIds
93924
94374
  ]);
93925
- const fetchIssues = (0, import_react65.useCallback)(async (limit) => {
94375
+ const fetchIssues = (0, import_react66.useCallback)(async (limit) => {
93926
94376
  try {
93927
94377
  const { stdout } = await spawnAsync("gh", [
93928
94378
  "issue",
@@ -93962,10 +94412,10 @@ Return a JSON object with:
93962
94412
  }));
93963
94413
  }
93964
94414
  }, []);
93965
- (0, import_react65.useEffect)(() => {
94415
+ (0, import_react66.useEffect)(() => {
93966
94416
  void fetchIssues(initialLimit);
93967
94417
  }, [fetchIssues, initialLimit]);
93968
- const handleNext = (0, import_react65.useCallback)(() => {
94418
+ const handleNext = (0, import_react66.useCallback)(() => {
93969
94419
  const nextIndex = state.currentIndex + 1;
93970
94420
  if (nextIndex < state.issues.length) {
93971
94421
  setFocusSection("target");
@@ -94473,7 +94923,7 @@ Return a JSON object with:
94473
94923
  };
94474
94924
 
94475
94925
  // packages/cli/src/ui/components/triage/TriageIssues.tsx
94476
- var import_react66 = __toESM(require_react(), 1);
94926
+ var import_react67 = __toESM(require_react(), 1);
94477
94927
  var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
94478
94928
  var VISIBLE_LINES_COLLAPSED2 = 8;
94479
94929
  var VISIBLE_LINES_EXPANDED2 = 20;
@@ -94492,7 +94942,7 @@ var TriageIssues = ({
94492
94942
  until
94493
94943
  }) => {
94494
94944
  const keyMatchers = useKeyMatchers();
94495
- const [state, setState] = (0, import_react66.useState)({
94945
+ const [state, setState] = (0, import_react67.useState)({
94496
94946
  status: "loading",
94497
94947
  issues: [],
94498
94948
  currentIndex: 0,
@@ -94500,15 +94950,15 @@ var TriageIssues = ({
94500
94950
  analyzingIds: /* @__PURE__ */ new Set(),
94501
94951
  message: "Fetching issues..."
94502
94952
  });
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)(
94953
+ const [targetExpanded, setTargetExpanded] = (0, import_react67.useState)(false);
94954
+ const [targetScrollOffset, setTargetScrollOffset] = (0, import_react67.useState)(0);
94955
+ const [isEditingComment, setIsEditingComment] = (0, import_react67.useState)(false);
94956
+ const [processedHistory, setProcessedHistory] = (0, import_react67.useState)(
94507
94957
  []
94508
94958
  );
94509
- const [showHistory, setShowHistory] = (0, import_react66.useState)(false);
94510
- const abortControllerRef = (0, import_react66.useRef)(new AbortController());
94511
- (0, import_react66.useEffect)(
94959
+ const [showHistory, setShowHistory] = (0, import_react67.useState)(false);
94960
+ const abortControllerRef = (0, import_react67.useRef)(new AbortController());
94961
+ (0, import_react67.useEffect)(
94512
94962
  () => () => {
94513
94963
  abortControllerRef.current.abort();
94514
94964
  },
@@ -94520,12 +94970,12 @@ var TriageIssues = ({
94520
94970
  });
94521
94971
  const currentIssue = state.issues[state.currentIndex];
94522
94972
  const analysis = currentIssue ? state.analysisCache.get(currentIssue.number) : void 0;
94523
- (0, import_react66.useEffect)(() => {
94973
+ (0, import_react67.useEffect)(() => {
94524
94974
  if (analysis?.suggested_comment && !isEditingComment) {
94525
94975
  commentBuffer.setText(analysis.suggested_comment);
94526
94976
  }
94527
94977
  }, [analysis, commentBuffer, isEditingComment]);
94528
- const fetchIssues = (0, import_react66.useCallback)(
94978
+ const fetchIssues = (0, import_react67.useCallback)(
94529
94979
  async (limit) => {
94530
94980
  try {
94531
94981
  const searchParts = [
@@ -94573,10 +95023,10 @@ var TriageIssues = ({
94573
95023
  },
94574
95024
  [until]
94575
95025
  );
94576
- (0, import_react66.useEffect)(() => {
95026
+ (0, import_react67.useEffect)(() => {
94577
95027
  void fetchIssues(initialLimit);
94578
95028
  }, [fetchIssues, initialLimit]);
94579
- const analyzeIssue = (0, import_react66.useCallback)(
95029
+ const analyzeIssue = (0, import_react67.useCallback)(
94580
95030
  async (issue) => {
94581
95031
  const client = config.getBaseLlmClient();
94582
95032
  const prompt = `
@@ -94635,7 +95085,7 @@ Return a JSON object with:
94635
95085
  },
94636
95086
  [config]
94637
95087
  );
94638
- (0, import_react66.useEffect)(() => {
95088
+ (0, import_react67.useEffect)(() => {
94639
95089
  if (state.issues.length === 0) return;
94640
95090
  const analyzeNext = async () => {
94641
95091
  const issuesToAnalyze = state.issues.slice(
@@ -94682,7 +95132,7 @@ Return a JSON object with:
94682
95132
  state.analyzingIds,
94683
95133
  analyzeIssue
94684
95134
  ]);
94685
- const handleNext = (0, import_react66.useCallback)(() => {
95135
+ const handleNext = (0, import_react67.useCallback)(() => {
94686
95136
  const nextIndex = state.currentIndex + 1;
94687
95137
  if (nextIndex < state.issues.length) {
94688
95138
  setTargetExpanded(false);
@@ -94697,7 +95147,7 @@ Return a JSON object with:
94697
95147
  }));
94698
95148
  }
94699
95149
  }, [state.currentIndex, state.issues.length]);
94700
- (0, import_react66.useEffect)(() => {
95150
+ (0, import_react67.useEffect)(() => {
94701
95151
  if (currentIssue && state.analysisCache.has(currentIssue.number)) {
94702
95152
  const res = state.analysisCache.get(currentIssue.number);
94703
95153
  if (res.recommendation === "keep") {
@@ -95207,6 +95657,12 @@ var planCommand = {
95207
95657
  if (previousApprovalMode !== "plan" /* PLAN */) {
95208
95658
  coreEvents.emitFeedback("info", "Switched to Plan Mode.");
95209
95659
  }
95660
+ if (context.invocation?.args) {
95661
+ return {
95662
+ type: "submit_prompt",
95663
+ content: context.invocation.args
95664
+ };
95665
+ }
95210
95666
  const approvedPlanPath = config.getApprovedPlanPath();
95211
95667
  if (!approvedPlanPath) {
95212
95668
  return;
@@ -95223,12 +95679,14 @@ var planCommand = {
95223
95679
  type: "gemini" /* GEMINI */,
95224
95680
  text: partToString(content.llmContent)
95225
95681
  });
95682
+ return;
95226
95683
  } catch (error) {
95227
95684
  coreEvents.emitFeedback(
95228
95685
  "error",
95229
95686
  `Failed to read approved plan at ${approvedPlanPath}: ${error}`,
95230
95687
  error
95231
95688
  );
95689
+ return;
95232
95690
  }
95233
95691
  },
95234
95692
  subCommands: [
@@ -95237,6 +95695,7 @@ var planCommand = {
95237
95695
  description: "Copy the currently approved plan to your clipboard",
95238
95696
  kind: "built-in" /* BUILT_IN */,
95239
95697
  autoExecute: true,
95698
+ takesArgs: false,
95240
95699
  action: copyAction
95241
95700
  }
95242
95701
  ]
@@ -96212,7 +96671,15 @@ var skillsCommand = {
96212
96671
  action: reloadAction2
96213
96672
  }
96214
96673
  ],
96215
- action: listAction4
96674
+ action: async (context, args) => {
96675
+ if (args) {
96676
+ const parsed = parseSlashCommand(`/${args}`, skillsCommand.subCommands);
96677
+ if (parsed.commandToExecute?.action) {
96678
+ return parsed.commandToExecute.action(context, parsed.args);
96679
+ }
96680
+ }
96681
+ return listAction4(context, args);
96682
+ }
96216
96683
  };
96217
96684
 
96218
96685
  // packages/cli/src/ui/commands/settingsCommand.ts
@@ -96228,15 +96695,15 @@ var settingsCommand = {
96228
96695
  })
96229
96696
  };
96230
96697
 
96231
- // packages/cli/src/ui/commands/shellsCommand.ts
96232
- var shellsCommand = {
96233
- name: "shells",
96234
- altNames: ["bashes"],
96698
+ // packages/cli/src/ui/commands/tasksCommand.ts
96699
+ var tasksCommand = {
96700
+ name: "tasks",
96701
+ altNames: ["bg", "background"],
96235
96702
  kind: "built-in" /* BUILT_IN */,
96236
- description: "Toggle background shells view",
96703
+ description: "Toggle background tasks view",
96237
96704
  autoExecute: true,
96238
96705
  action: async (context) => {
96239
- context.ui.toggleBackgroundShell();
96706
+ context.ui.toggleBackgroundTasks();
96240
96707
  }
96241
96708
  };
96242
96709
 
@@ -96760,7 +97227,7 @@ var BuiltinCommandLoader = class {
96760
97227
  }
96761
97228
  ] : [skillsCommand] : [],
96762
97229
  settingsCommand,
96763
- shellsCommand,
97230
+ tasksCommand,
96764
97231
  vimCommand,
96765
97232
  setupGithubCommand,
96766
97233
  terminalSetupCommand,
@@ -97521,6 +97988,10 @@ export {
97521
97988
  ACTIVE_SHELL_MAX_LINES,
97522
97989
  COMPLETED_SHELL_MAX_LINES,
97523
97990
  SUBAGENT_MAX_LINES,
97991
+ SKILLS_DOCS_URL,
97992
+ COMPACT_TOOL_SUBVIEW_MAX_LINES,
97993
+ MAX_SHELL_OUTPUT_SIZE,
97994
+ SHELL_OUTPUT_TRUNCATION_BUFFER,
97524
97995
  require_tinygradient,
97525
97996
  INK_SUPPORTED_NAMES,
97526
97997
  INK_NAME_TO_HEX_MAP,
@@ -97546,6 +98017,7 @@ export {
97546
98017
  escapeAnsiCtrlCodes,
97547
98018
  require_react,
97548
98019
  mapCoreStatusToDisplayStatus,
98020
+ isTodoList,
97549
98021
  RESUME_LATEST,
97550
98022
  SessionError,
97551
98023
  cleanMessage,
@@ -97651,7 +98123,6 @@ export {
97651
98123
  parseMouseEvent,
97652
98124
  isIncompleteMouseSequence,
97653
98125
  useFocus,
97654
- appEvents,
97655
98126
  SettingsContext,
97656
98127
  useSettings,
97657
98128
  useSettingsStore,