deepcode-ai 1.1.13 → 1.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2210,12 +2210,14 @@ import { createInterface } from "readline";
2210
2210
  import { Effect as Effect3 } from "effect";
2211
2211
  import { z as z22 } from "zod";
2212
2212
  import { Effect as Effect2 } from "effect";
2213
+ import fs from "fs";
2214
+ import path22 from "path";
2213
2215
  import { createHash } from "crypto";
2214
2216
  import { mkdir as mkdir2, readFile, rm as rm2, writeFile as writeFile2 } from "fs/promises";
2215
- import path22 from "path";
2217
+ import path3 from "path";
2216
2218
  import { mkdir as mkdir22, readFile as readFile2 } from "fs/promises";
2217
2219
  import os from "os";
2218
- import path3 from "path";
2220
+ import path4 from "path";
2219
2221
  import { EventEmitter } from "events";
2220
2222
  import { z as z3 } from "zod";
2221
2223
  import { spawn as spawn3 } from "child_process";
@@ -2225,34 +2227,36 @@ import { execFile as execFile2 } from "child_process";
2225
2227
  import { z as z4 } from "zod";
2226
2228
  import { spawn as spawn4 } from "child_process";
2227
2229
  import { existsSync } from "fs";
2228
- import path4 from "path";
2229
- import { mkdir as mkdir3, appendFile } from "fs/promises";
2230
2230
  import path5 from "path";
2231
+ import { mkdir as mkdir3, appendFile } from "fs/promises";
2232
+ import path6 from "path";
2231
2233
  import os2 from "os";
2232
2234
  import { access, realpath } from "fs/promises";
2233
- import path6 from "path";
2234
- import os3 from "os";
2235
2235
  import path7 from "path";
2236
- import { mkdir as mkdir4, readFile as readFile3, readdir as readdir2 } from "fs/promises";
2236
+ import os3 from "os";
2237
2237
  import path8 from "path";
2238
+ import { mkdir as mkdir4, readFile as readFile3, readdir as readdir2 } from "fs/promises";
2239
+ import path9 from "path";
2238
2240
  import { readFile as readFile5 } from "fs/promises";
2239
- import path10 from "path";
2241
+ import path11 from "path";
2240
2242
  import { Effect as Effect4 } from "effect";
2241
2243
  import { z as z5 } from "zod";
2242
2244
  import { lstat as lstat2, mkdir as mkdir6, readFile as readFile6, readdir as readdir4, stat, writeFile as writeFile22 } from "fs/promises";
2243
- import path11 from "path";
2245
+ import path12 from "path";
2244
2246
  import { Effect as Effect5 } from "effect";
2245
2247
  import { z as z6 } from "zod";
2246
2248
  import { Effect as Effect6 } from "effect";
2247
2249
  import { z as z7 } from "zod";
2248
- import path12 from "path";
2250
+ import path13 from "path";
2249
2251
  import { Effect as Effect7 } from "effect";
2250
2252
  import { z as z8 } from "zod";
2251
2253
  import { Effect as Effect8 } from "effect";
2252
2254
  import { z as z9 } from "zod";
2253
2255
  import { Effect as Effect9 } from "effect";
2254
2256
  import { z as z10 } from "zod";
2255
- import path13 from "path";
2257
+ import { Effect as Effect10 } from "effect";
2258
+ import { z as z11 } from "zod";
2259
+ import path14 from "path";
2256
2260
  import { readdir as readdir5, lstat as lstat3 } from "fs/promises";
2257
2261
  var DeepCodeError = class extends Error {
2258
2262
  constructor(message, code, cause) {
@@ -2277,8 +2281,8 @@ var PermissionDeniedError = class extends DeepCodeError {
2277
2281
  }
2278
2282
  };
2279
2283
  var PathNotAllowedError = class extends DeepCodeError {
2280
- constructor(path14, reason) {
2281
- super(`Path is not allowed: ${path14}. ${reason}`, "PATH_NOT_ALLOWED");
2284
+ constructor(path15, reason) {
2285
+ super(`Path is not allowed: ${path15}. ${reason}`, "PATH_NOT_ALLOWED");
2282
2286
  this.name = "PathNotAllowedError";
2283
2287
  }
2284
2288
  };
@@ -3416,7 +3420,8 @@ var Agent = class {
3416
3420
  async run(options) {
3417
3421
  const session = options.session;
3418
3422
  const mode = options.mode ?? this.config.agentMode;
3419
- const turnStrategy = this.resolveTurnStrategy(options.input, mode);
3423
+ const baseTurnStrategy = this.resolveTurnStrategy(options.input, mode);
3424
+ const turnStrategy = options.systemPrompt ? { ...baseTurnStrategy, systemPrompt: options.systemPrompt } : baseTurnStrategy;
3420
3425
  const resolvedTarget = resolveExecutionTarget(
3421
3426
  this.config,
3422
3427
  session,
@@ -3700,7 +3705,7 @@ ${assistantText}` : assistantText;
3700
3705
  break;
3701
3706
  }
3702
3707
  for (const call of toolCalls) {
3703
- const result = await this.executeTool(call, session, mode, options.signal, allowedToolNames);
3708
+ const result = await this.executeTool(call, session, mode, options.signal, allowedToolNames, options.onToolActivity);
3704
3709
  this.sessions.addMessage(session.id, {
3705
3710
  role: "tool",
3706
3711
  source: "tool",
@@ -3719,8 +3724,9 @@ ${assistantText}` : assistantText;
3719
3724
  let iterations = startingIterations;
3720
3725
  const resolvedModel = session.model ?? resolveConfiguredModelForProvider(this.config, session.provider);
3721
3726
  const toolProfile = resolveModelExecutionProfile(session.provider, resolvedModel);
3722
- const toolDefinitions = turnStrategy.allowTools ? this.toolDefinitions(mode, toolProfile.toolSchemaMode) : [];
3723
- const allowedToolNames = turnStrategy.allowTools ? this.allowedToolNamesForMode(mode) : /* @__PURE__ */ new Set();
3727
+ const baseAllowedToolNames = turnStrategy.allowTools ? this.allowedToolNamesForMode(mode) : /* @__PURE__ */ new Set();
3728
+ const allowedToolNames = this.applyToolOverrides(baseAllowedToolNames, options);
3729
+ const toolDefinitions = turnStrategy.allowTools ? this.toolDefinitionsForNames(allowedToolNames, toolProfile.toolSchemaMode) : [];
3724
3730
  const textToolFallbackEnabled = toolDefinitions.length > 0 && toolProfile.toolCallStrategy !== "native";
3725
3731
  while (iterations < maxIterations) {
3726
3732
  iterations += 1;
@@ -3799,7 +3805,7 @@ ${assistantText}` : assistantText;
3799
3805
  }
3800
3806
  if (toolCalls.length === 0) break;
3801
3807
  for (const call of toolCalls) {
3802
- const result = await this.executeTool(call, session, mode, options.signal, allowedToolNames);
3808
+ const result = await this.executeTool(call, session, mode, options.signal, allowedToolNames, options.onToolActivity);
3803
3809
  this.sessions.addMessage(session.id, {
3804
3810
  role: "tool",
3805
3811
  source: "tool",
@@ -3829,7 +3835,7 @@ ${assistantText}` : assistantText;
3829
3835
  }
3830
3836
  return { path: entry.path, restored: true };
3831
3837
  }
3832
- async executeTool(call, session, mode, signal, allowedToolNames = this.allowedToolNamesForMode(mode)) {
3838
+ async executeTool(call, session, mode, signal, allowedToolNames = this.allowedToolNamesForMode(mode), onToolActivity) {
3833
3839
  if (!this.isToolAllowed(call.name, mode)) {
3834
3840
  const modeHint = mode === "plan" ? "Switch to BUILD mode (press Tab in the TUI) to enable this tool." : "";
3835
3841
  return {
@@ -3880,7 +3886,7 @@ ${assistantText}` : assistantText;
3880
3886
  snapshotForUndo: async (filePath) => {
3881
3887
  let previousContent = null;
3882
3888
  try {
3883
- previousContent = await import("fs/promises").then((fs7) => fs7.readFile(filePath, "utf8"));
3889
+ previousContent = await import("fs/promises").then((fs23) => fs23.readFile(filePath, "utf8"));
3884
3890
  } catch {
3885
3891
  }
3886
3892
  const stack = this.undoStacks.get(session.id) ?? [];
@@ -3894,7 +3900,9 @@ ${assistantText}` : assistantText;
3894
3900
  message: `Calling ${call.name}`,
3895
3901
  metadata: { tool: call.name, args: call.arguments }
3896
3902
  });
3903
+ onToolActivity?.(call.name, true);
3897
3904
  const result = await Effect.runPromise(tool.execute(parsed.data, context));
3905
+ onToolActivity?.(call.name, false);
3898
3906
  const output = typeof result === "string" ? result : JSON.stringify(result, null, 2);
3899
3907
  this.logToolActivity(session, {
3900
3908
  type: "tool_result",
@@ -3964,6 +3972,14 @@ ${assistantText}` : assistantText;
3964
3972
  this.tools.list().filter((tool) => this.isToolAllowed(tool.name, mode)).map((tool) => tool.name)
3965
3973
  );
3966
3974
  }
3975
+ applyToolOverrides(base, options) {
3976
+ if (!options.allowedTools && !options.disallowedTools) return base;
3977
+ let names = options.allowedTools ? new Set(options.allowedTools) : new Set(base);
3978
+ if (options.disallowedTools) {
3979
+ for (const name of options.disallowedTools) names.delete(name);
3980
+ }
3981
+ return new Set([...names].filter((n) => base.has(n)));
3982
+ }
3967
3983
  allowedToolNamesForTaskType(mode, taskType) {
3968
3984
  if (taskType === "research") return /* @__PURE__ */ new Set([...PLAN_ALLOWED_TOOLS]);
3969
3985
  if (taskType === "verify") return /* @__PURE__ */ new Set(["read_file", "list_dir", "analyze_code", "search_text", "bash"]);
@@ -4468,19 +4484,73 @@ var McpManager = class {
4468
4484
  this.clients.length = 0;
4469
4485
  }
4470
4486
  };
4487
+ function parseFrontmatter(content) {
4488
+ const meta = {};
4489
+ let body = content;
4490
+ const fmMatch = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/.exec(content);
4491
+ if (!fmMatch) return { meta, body };
4492
+ const fmBlock = fmMatch[1];
4493
+ body = fmMatch[2];
4494
+ for (const line of fmBlock.split(/\r?\n/)) {
4495
+ const kv = /^(\w[\w-]*):\s*(.*)$/.exec(line.trim());
4496
+ if (!kv) continue;
4497
+ const key = kv[1];
4498
+ const raw = kv[2].trim();
4499
+ if (raw.startsWith("[") && raw.endsWith("]")) {
4500
+ meta[key] = raw.slice(1, -1).split(",").map((s) => s.trim().replace(/^['"]|['"]$/g, "")).filter(Boolean);
4501
+ } else {
4502
+ meta[key] = raw.replace(/^['"]|['"]$/g, "");
4503
+ }
4504
+ }
4505
+ return { meta, body };
4506
+ }
4507
+ function loadAgentConfigs(worktree) {
4508
+ const dir = path22.join(worktree, ".deepcode", "agents");
4509
+ if (!fs.existsSync(dir)) return [];
4510
+ const configs = [];
4511
+ let entries;
4512
+ try {
4513
+ entries = fs.readdirSync(dir);
4514
+ } catch {
4515
+ return [];
4516
+ }
4517
+ for (const entry of entries) {
4518
+ if (!entry.endsWith(".md")) continue;
4519
+ const filePath = path22.join(dir, entry);
4520
+ let content;
4521
+ try {
4522
+ content = fs.readFileSync(filePath, "utf8");
4523
+ } catch {
4524
+ continue;
4525
+ }
4526
+ const { meta, body } = parseFrontmatter(content);
4527
+ const name = typeof meta["name"] === "string" ? meta["name"] : path22.basename(entry, ".md");
4528
+ configs.push({
4529
+ name,
4530
+ description: typeof meta["description"] === "string" ? meta["description"] : void 0,
4531
+ systemPrompt: body.trim(),
4532
+ model: typeof meta["model"] === "string" ? meta["model"] : void 0,
4533
+ allowedTools: Array.isArray(meta["allowed_tools"]) ? meta["allowed_tools"] : void 0,
4534
+ disallowedTools: Array.isArray(meta["disallowed_tools"]) ? meta["disallowed_tools"] : void 0
4535
+ });
4536
+ }
4537
+ return configs;
4538
+ }
4471
4539
  var SubagentManager = class {
4472
- constructor(agent, sessions, defaultProvider, defaultModel, defaultConcurrency = 4) {
4540
+ constructor(agent, sessions, defaultProvider, defaultModel, defaultConcurrency = 4, events) {
4473
4541
  this.agent = agent;
4474
4542
  this.sessions = sessions;
4475
4543
  this.defaultProvider = defaultProvider;
4476
4544
  this.defaultModel = defaultModel;
4477
4545
  this.defaultConcurrency = defaultConcurrency;
4546
+ this.events = events;
4478
4547
  }
4479
4548
  agent;
4480
4549
  sessions;
4481
4550
  defaultProvider;
4482
4551
  defaultModel;
4483
4552
  defaultConcurrency;
4553
+ events;
4484
4554
  async runParallel(tasks, options = {}) {
4485
4555
  const concurrency = Math.max(1, options.concurrency ?? Math.min(tasks.length, this.defaultConcurrency));
4486
4556
  const results = [];
@@ -4498,22 +4568,34 @@ var SubagentManager = class {
4498
4568
  await Promise.all(workers);
4499
4569
  return tasks.map((task) => results.find((result) => result.taskId === task.id)).filter(Boolean);
4500
4570
  }
4571
+ async forkFrom(parentSessionId, task, signal) {
4572
+ const parentMessages = this.sessions.get(parentSessionId).messages;
4573
+ return this.runOne({ ...task, parentMessages }, signal);
4574
+ }
4501
4575
  async runOne(task, signal) {
4502
4576
  const session = this.createChildSession(task);
4577
+ this.events?.emit("subagent:start", { taskId: task.id, prompt: task.prompt });
4503
4578
  try {
4504
4579
  const output = await this.agent.run({
4505
4580
  session,
4506
4581
  input: task.prompt,
4507
4582
  provider: task.provider,
4508
- signal
4583
+ signal,
4584
+ systemPrompt: task.systemPrompt,
4585
+ allowedTools: task.allowedTools,
4586
+ disallowedTools: task.disallowedTools,
4587
+ onToolActivity: this.events ? (toolName, active) => this.events.emit("subagent:tool", { taskId: task.id, toolName, active }) : void 0
4509
4588
  });
4589
+ this.events?.emit("subagent:complete", { taskId: task.id });
4510
4590
  return { taskId: task.id, sessionId: session.id, output };
4511
4591
  } catch (error) {
4592
+ const errMsg = error instanceof Error ? error.message : String(error);
4593
+ this.events?.emit("subagent:complete", { taskId: task.id, error: errMsg });
4512
4594
  return {
4513
4595
  taskId: task.id,
4514
4596
  sessionId: session.id,
4515
4597
  output: "",
4516
- error: error instanceof Error ? error.message : String(error)
4598
+ error: errMsg
4517
4599
  };
4518
4600
  }
4519
4601
  }
@@ -4528,6 +4610,11 @@ var SubagentManager = class {
4528
4610
  taskId: task.id,
4529
4611
  ...task.metadata
4530
4612
  };
4613
+ if (task.parentMessages?.length) {
4614
+ for (const msg of task.parentMessages) {
4615
+ this.sessions.addMessage(session.id, { role: msg.role, source: msg.source, content: msg.content });
4616
+ }
4617
+ }
4531
4618
  this.sessions.save(session);
4532
4619
  return session;
4533
4620
  }
@@ -4557,7 +4644,7 @@ var ToolCache = class {
4557
4644
  async set(namespace, keyParts, value) {
4558
4645
  if (!this.config.cache.enabled) return;
4559
4646
  const key = cacheKey(namespace, keyParts);
4560
- const dir = path22.join(this.worktree, ".deepcode", "cache");
4647
+ const dir = path3.join(this.worktree, ".deepcode", "cache");
4561
4648
  await mkdir2(dir, { recursive: true });
4562
4649
  const now = Date.now();
4563
4650
  const entry = {
@@ -4570,10 +4657,10 @@ var ToolCache = class {
4570
4657
  `, "utf8");
4571
4658
  }
4572
4659
  async clear() {
4573
- await rm2(path22.join(this.worktree, ".deepcode", "cache"), { recursive: true, force: true });
4660
+ await rm2(path3.join(this.worktree, ".deepcode", "cache"), { recursive: true, force: true });
4574
4661
  }
4575
4662
  filePath(key) {
4576
- return path22.join(this.worktree, ".deepcode", "cache", `${key}.json`);
4663
+ return path3.join(this.worktree, ".deepcode", "cache", `${key}.json`);
4577
4664
  }
4578
4665
  };
4579
4666
  function cacheKey(namespace, keyParts) {
@@ -4581,12 +4668,12 @@ function cacheKey(namespace, keyParts) {
4581
4668
  }
4582
4669
  var ConfigLoader = class {
4583
4670
  resolveConfigPath(options) {
4584
- return options.configPath ? path3.resolve(options.configPath) : path3.join(options.cwd, ".deepcode", "config.json");
4671
+ return options.configPath ? path4.resolve(options.configPath) : path4.join(options.cwd, ".deepcode", "config.json");
4585
4672
  }
4586
4673
  async load(options) {
4587
4674
  const configPath = this.resolveConfigPath(options);
4588
4675
  const rawFile = await this.readOptionalJson(configPath);
4589
- const cwd = path3.dirname(configPath) === path3.join(path3.resolve(options.cwd), ".deepcode") ? path3.resolve(options.cwd) : path3.dirname(configPath);
4676
+ const cwd = path4.dirname(configPath) === path4.join(path4.resolve(options.cwd), ".deepcode") ? path4.resolve(options.cwd) : path4.dirname(configPath);
4590
4677
  const openrouterApiKeyFile = parseOptionalString(process.env.OPENROUTER_API_KEY_FILE) ?? rawFile.providers?.openrouter?.apiKeyFile;
4591
4678
  const anthropicApiKeyFile = parseOptionalString(process.env.ANTHROPIC_API_KEY_FILE) ?? rawFile.providers?.anthropic?.apiKeyFile;
4592
4679
  const openaiApiKeyFile = parseOptionalString(process.env.OPENAI_API_KEY_FILE) ?? rawFile.providers?.openai?.apiKeyFile;
@@ -4668,14 +4755,14 @@ var ConfigLoader = class {
4668
4755
  if (!parsed.success) {
4669
4756
  throw new ConfigError(`Invalid DeepCode config: ${parsed.error.message}`, parsed.error);
4670
4757
  }
4671
- await mkdir22(path3.dirname(configPath), { recursive: true });
4758
+ await mkdir22(path4.dirname(configPath), { recursive: true });
4672
4759
  await writeFileAtomic(configPath, `${JSON.stringify(parsed.data, null, 2)}
4673
4760
  `);
4674
4761
  return configPath;
4675
4762
  }
4676
4763
  async init(cwd) {
4677
- const dir = path3.join(cwd, ".deepcode");
4678
- const configPath = path3.join(dir, "config.json");
4764
+ const dir = path4.join(cwd, ".deepcode");
4765
+ const configPath = path4.join(dir, "config.json");
4679
4766
  await mkdir22(dir, { recursive: true });
4680
4767
  const config = DeepCodeConfigSchema.parse({});
4681
4768
  await writeFileAtomic(configPath, `${JSON.stringify(config, null, 2)}
@@ -4727,7 +4814,7 @@ function normalizeLabel(value) {
4727
4814
  function resolveUserPath(filePath, cwd) {
4728
4815
  if (!filePath) return void 0;
4729
4816
  const expanded = filePath === "~" ? os.homedir() : filePath.replace(/^~(?=\/|\\)/, os.homedir());
4730
- return path3.isAbsolute(expanded) ? expanded : path3.resolve(cwd, expanded);
4817
+ return path4.isAbsolute(expanded) ? expanded : path4.resolve(cwd, expanded);
4731
4818
  }
4732
4819
  function parseOptionalBoolean(value) {
4733
4820
  if (value === void 0) return void 0;
@@ -4903,13 +4990,13 @@ var GitHubClient = class {
4903
4990
  }
4904
4991
  return parseGitHubRemote(result.stdout.trim());
4905
4992
  }
4906
- async request(path14, init = {}) {
4993
+ async request(path15, init = {}) {
4907
4994
  if (!this.options.token) {
4908
4995
  throw new Error(
4909
4996
  "GitHub token is required. Set GITHUB_TOKEN or .deepcode/config.json github.token."
4910
4997
  );
4911
4998
  }
4912
- const response = await fetch(`${this.apiBase}${path14}`, {
4999
+ const response = await fetch(`${this.apiBase}${path15}`, {
4913
5000
  ...init,
4914
5001
  headers: {
4915
5002
  accept: "application/vnd.github+json",
@@ -4925,13 +5012,13 @@ var GitHubClient = class {
4925
5012
  if (response.status === 204) return void 0;
4926
5013
  return await response.json();
4927
5014
  }
4928
- async requestText(path14, init = {}) {
5015
+ async requestText(path15, init = {}) {
4929
5016
  if (!this.options.token) {
4930
5017
  throw new Error(
4931
5018
  "GitHub token is required. Set GITHUB_TOKEN or .deepcode/config.json github.token."
4932
5019
  );
4933
5020
  }
4934
- const response = await fetch(`${this.apiBase}${path14}`, {
5021
+ const response = await fetch(`${this.apiBase}${path15}`, {
4935
5022
  ...init,
4936
5023
  headers: {
4937
5024
  accept: "application/vnd.github+json",
@@ -5272,7 +5359,7 @@ var LspClient = class {
5272
5359
  await this.request("initialize", {
5273
5360
  processId: process.pid,
5274
5361
  rootUri: toFileUri(this.rootPath),
5275
- workspaceFolders: [{ uri: toFileUri(this.rootPath), name: path4.basename(this.rootPath) }],
5362
+ workspaceFolders: [{ uri: toFileUri(this.rootPath), name: path5.basename(this.rootPath) }],
5276
5363
  capabilities: {
5277
5364
  workspace: {
5278
5365
  symbol: {
@@ -5374,7 +5461,7 @@ var LspClient = class {
5374
5461
  }
5375
5462
  };
5376
5463
  function pickLanguageServer(servers, rootPath, queryPath) {
5377
- const extension = path4.extname(queryPath);
5464
+ const extension = path5.extname(queryPath);
5378
5465
  const byExtension = servers.find((server) => server.fileExtensions.includes(extension));
5379
5466
  if (byExtension) return byExtension;
5380
5467
  const projectFiles = [
@@ -5384,14 +5471,14 @@ function pickLanguageServer(servers, rootPath, queryPath) {
5384
5471
  ["Cargo.toml", "rust"],
5385
5472
  ["go.mod", "go"]
5386
5473
  ];
5387
- const detected = projectFiles.find(([file]) => pathExists(path4.join(rootPath, file)))?.[1];
5474
+ const detected = projectFiles.find(([file]) => pathExists(path5.join(rootPath, file)))?.[1];
5388
5475
  return detected ? servers.find((server) => server.languages.includes(detected)) : servers[0];
5389
5476
  }
5390
5477
  function pathExists(filePath) {
5391
5478
  return existsSync(filePath);
5392
5479
  }
5393
5480
  function toFileUri(filePath) {
5394
- return `file://${path4.resolve(filePath).replaceAll(path4.sep, "/")}`;
5481
+ return `file://${path5.resolve(filePath).replaceAll(path5.sep, "/")}`;
5395
5482
  }
5396
5483
  function fromFileUri(uri) {
5397
5484
  return decodeURIComponent(uri.replace(/^file:\/\//, ""));
@@ -5399,12 +5486,12 @@ function fromFileUri(uri) {
5399
5486
  var SECRET_KEY_PATTERN = /(api[_-]?key|token|authorization|secret|password|passwd|credential|private[_-]?key)/i;
5400
5487
  var MIN_SECRET_VALUE_LENGTH = 4;
5401
5488
  function redactSecrets(value, options = {}) {
5402
- const path14 = options.path ?? [];
5489
+ const path15 = options.path ?? [];
5403
5490
  const secretPlaceholder = options.secretPlaceholder ?? "[redacted]";
5404
5491
  const emptySecretPlaceholder = options.emptySecretPlaceholder ?? "[empty]";
5405
5492
  const secretValues = options.secretValues ?? collectSecretValues();
5406
5493
  if (typeof value === "string") {
5407
- if (isSecretPath(path14)) {
5494
+ if (isSecretPath(path15)) {
5408
5495
  return value.length > 0 ? secretPlaceholder : emptySecretPlaceholder;
5409
5496
  }
5410
5497
  return redactText(value, secretValues, secretPlaceholder);
@@ -5413,7 +5500,7 @@ function redactSecrets(value, options = {}) {
5413
5500
  return value.map(
5414
5501
  (item, index) => redactSecrets(item, {
5415
5502
  ...options,
5416
- path: [...path14, String(index)],
5503
+ path: [...path15, String(index)],
5417
5504
  secretValues
5418
5505
  })
5419
5506
  );
@@ -5424,7 +5511,7 @@ function redactSecrets(value, options = {}) {
5424
5511
  key,
5425
5512
  redactSecrets(item, {
5426
5513
  ...options,
5427
- path: [...path14, key],
5514
+ path: [...path15, key],
5428
5515
  secretValues
5429
5516
  })
5430
5517
  ])
@@ -5462,8 +5549,8 @@ function collectSecretValues(config) {
5462
5549
  }
5463
5550
  return [...values].sort((left, right) => right.length - left.length);
5464
5551
  }
5465
- function isSecretPath(path14) {
5466
- const key = path14[path14.length - 1] ?? "";
5552
+ function isSecretPath(path15) {
5553
+ const key = path15[path15.length - 1] ?? "";
5467
5554
  if (/(api[_-]?key|token|secret|credential).*file/i.test(key)) return false;
5468
5555
  return SECRET_KEY_PATTERN.test(key);
5469
5556
  }
@@ -6321,10 +6408,10 @@ var AuditLogger = class {
6321
6408
  }
6322
6409
  worktree;
6323
6410
  async log(entry) {
6324
- const dir = path5.join(this.worktree, ".deepcode");
6411
+ const dir = path6.join(this.worktree, ".deepcode");
6325
6412
  await mkdir3(dir, { recursive: true });
6326
6413
  const payload = redactSecrets({ ...entry, createdAt: entry.createdAt ?? nowIso() });
6327
- await appendFile(path5.join(dir, "audit.log"), `${JSON.stringify(payload)}
6414
+ await appendFile(path6.join(dir, "audit.log"), `${JSON.stringify(payload)}
6328
6415
  `, "utf8");
6329
6416
  }
6330
6417
  };
@@ -6366,7 +6453,7 @@ var PathSecurity = class {
6366
6453
  return resolved;
6367
6454
  }
6368
6455
  classify(targetPath) {
6369
- const candidate = path6.normalize(targetPath);
6456
+ const candidate = path7.normalize(targetPath);
6370
6457
  const blacklisted = this.rules.blacklist.some((rule) => globToRegex(rule).test(candidate));
6371
6458
  if (blacklisted) {
6372
6459
  return "blacklisted";
@@ -6379,8 +6466,8 @@ var PathSecurity = class {
6379
6466
  }
6380
6467
  async resolvePath(inputPath) {
6381
6468
  const expanded = this.expandUserPath(inputPath);
6382
- const absolute = path6.isAbsolute(expanded) ? expanded : path6.resolve(this.worktree, expanded);
6383
- const normalized2 = path6.normalize(absolute);
6469
+ const absolute = path7.isAbsolute(expanded) ? expanded : path7.resolve(this.worktree, expanded);
6470
+ const normalized2 = path7.normalize(absolute);
6384
6471
  const resolved = await this.resolveExistingParent(normalized2);
6385
6472
  return resolved;
6386
6473
  }
@@ -6392,7 +6479,7 @@ var PathSecurity = class {
6392
6479
  const duplicatedHomePrefix = normalizedHome ? `~/${normalizedHome}` : "";
6393
6480
  if (duplicatedHomePrefix && (normalizedInput === duplicatedHomePrefix || normalizedInput.startsWith(`${duplicatedHomePrefix}/`))) {
6394
6481
  const absoluteSuffix = normalizedInput.slice(2);
6395
- return path6.sep === "\\" ? absoluteSuffix.replace(/\//g, "\\") : `/${absoluteSuffix}`;
6482
+ return path7.sep === "\\" ? absoluteSuffix.replace(/\//g, "\\") : `/${absoluteSuffix}`;
6396
6483
  }
6397
6484
  return inputPath.replace(/^~(?=\/|\\)/, this.home);
6398
6485
  }
@@ -6401,16 +6488,16 @@ var PathSecurity = class {
6401
6488
  }
6402
6489
  async resolveExistingParent(targetPath) {
6403
6490
  let cursor = targetPath;
6404
- while (cursor !== path6.dirname(cursor)) {
6491
+ while (cursor !== path7.dirname(cursor)) {
6405
6492
  try {
6406
6493
  await access(cursor);
6407
6494
  const real = await realpath(cursor);
6408
6495
  if (targetPath === cursor) {
6409
6496
  return real;
6410
6497
  }
6411
- return path6.join(real, path6.relative(cursor, targetPath));
6498
+ return path7.join(real, path7.relative(cursor, targetPath));
6412
6499
  } catch {
6413
- cursor = path6.dirname(cursor);
6500
+ cursor = path7.dirname(cursor);
6414
6501
  }
6415
6502
  }
6416
6503
  return targetPath;
@@ -6708,16 +6795,16 @@ function whitelistExampleForPath(targetPath) {
6708
6795
  return "${WORKTREE}/**";
6709
6796
  }
6710
6797
  const home = process.env.HOME ?? os3.homedir();
6711
- const normalizedTarget = path7.resolve(targetPath);
6712
- const normalizedHome = path7.resolve(home);
6798
+ const normalizedTarget = path8.resolve(targetPath);
6799
+ const normalizedHome = path8.resolve(home);
6713
6800
  if (normalizedTarget === normalizedHome) {
6714
6801
  return "${HOME}/**";
6715
6802
  }
6716
- if (normalizedTarget.startsWith(`${normalizedHome}${path7.sep}`)) {
6717
- const relative2 = path7.relative(normalizedHome, normalizedTarget).replaceAll(path7.sep, "/");
6803
+ if (normalizedTarget.startsWith(`${normalizedHome}${path8.sep}`)) {
6804
+ const relative2 = path8.relative(normalizedHome, normalizedTarget).replaceAll(path8.sep, "/");
6718
6805
  return relative2 ? `\${HOME}/${relative2}/**` : "${HOME}/**";
6719
6806
  }
6720
- const normalizedForConfig = normalizedTarget.replaceAll(path7.sep, "/");
6807
+ const normalizedForConfig = normalizedTarget.replaceAll(path8.sep, "/");
6721
6808
  if (normalizedForConfig === "/") {
6722
6809
  return "/**";
6723
6810
  }
@@ -6777,20 +6864,20 @@ var SessionManager = class {
6777
6864
  }
6778
6865
  async persist(sessionId) {
6779
6866
  const session = this.get(sessionId);
6780
- const dir = path8.join(this.worktree, ".deepcode", "sessions");
6867
+ const dir = path9.join(this.worktree, ".deepcode", "sessions");
6781
6868
  await mkdir4(dir, { recursive: true });
6782
- const filePath = path8.join(dir, `${session.id}.json`);
6869
+ const filePath = path9.join(dir, `${session.id}.json`);
6783
6870
  await writeFileAtomic(filePath, `${JSON.stringify(session, null, 2)}
6784
6871
  `);
6785
6872
  return filePath;
6786
6873
  }
6787
6874
  async loadAll() {
6788
- const dir = path8.join(this.worktree, ".deepcode", "sessions");
6875
+ const dir = path9.join(this.worktree, ".deepcode", "sessions");
6789
6876
  try {
6790
6877
  const entries = await readdir2(dir);
6791
6878
  const loaded = [];
6792
6879
  for (const entry of entries.filter((value) => value.endsWith(".json"))) {
6793
- const filePath = path8.join(dir, entry);
6880
+ const filePath = path9.join(dir, entry);
6794
6881
  try {
6795
6882
  const parsed = JSON.parse(await readFile3(filePath, "utf8"));
6796
6883
  const result = SessionSchema.safeParse(parsed);
@@ -6838,7 +6925,7 @@ var analyzeCodeTool = defineTool({
6838
6925
  const declarations = content.split(/\r?\n/).map((line, index) => ({ line: index + 1, text: line.trim() })).filter(({ text }) => /^(export\s+)?(class|interface|type|function|const|let|var|def|func)\s+/.test(text));
6839
6926
  const result = {
6840
6927
  file: filePath,
6841
- extension: path10.extname(filePath),
6928
+ extension: path11.extname(filePath),
6842
6929
  lines: content.split(/\r?\n/).length,
6843
6930
  declarations
6844
6931
  };
@@ -6907,7 +6994,7 @@ var readFileTool = defineTool({
6907
6994
  if (cached.hit && cached.value !== void 0) {
6908
6995
  context.logActivity({
6909
6996
  type: "cache_hit",
6910
- message: `Cache hit read_file ${path11.relative(context.worktree, filePath)}`,
6997
+ message: `Cache hit read_file ${path12.relative(context.worktree, filePath)}`,
6911
6998
  metadata: { path: filePath }
6912
6999
  });
6913
7000
  return cached.value;
@@ -6918,7 +7005,7 @@ var readFileTool = defineTool({
6918
7005
  const end = args.limit ? Math.min(lines.length, start + args.limit) : lines.length;
6919
7006
  context.logActivity({
6920
7007
  type: "file_read",
6921
- message: `Read ${path11.relative(context.worktree, filePath)}`,
7008
+ message: `Read ${path12.relative(context.worktree, filePath)}`,
6922
7009
  metadata: { path: filePath, lines: end - start }
6923
7010
  });
6924
7011
  const output = lines.slice(start, end).map((line, index) => `${String(start + index + 1).padStart(5, " ")} | ${line}`).join("\n");
@@ -6940,11 +7027,11 @@ var writeFileTool = defineTool({
6940
7027
  const filePath = await context.pathSecurity.normalize(args.path, { enforceAccess: false });
6941
7028
  await context.permissions.ensure({ operation: "write_file", kind: "write", path: filePath });
6942
7029
  await context.snapshotForUndo?.(filePath);
6943
- await mkdir6(path11.dirname(filePath), { recursive: true });
7030
+ await mkdir6(path12.dirname(filePath), { recursive: true });
6944
7031
  await writeFile22(filePath, args.content, "utf8");
6945
7032
  context.logActivity({
6946
7033
  type: "file_written",
6947
- message: `Wrote ${path11.relative(context.worktree, filePath)}`,
7034
+ message: `Wrote ${path12.relative(context.worktree, filePath)}`,
6948
7035
  metadata: { path: filePath, bytes: Buffer.byteLength(args.content) }
6949
7036
  });
6950
7037
  return `File written: ${filePath}`;
@@ -6977,7 +7064,7 @@ var editFileTool = defineTool({
6977
7064
  await writeFile22(filePath, next, "utf8");
6978
7065
  context.logActivity({
6979
7066
  type: "file_edited",
6980
- message: `Edited ${path11.relative(context.worktree, filePath)}`,
7067
+ message: `Edited ${path12.relative(context.worktree, filePath)}`,
6981
7068
  metadata: { path: filePath, removedBytes: args.oldString.length, addedBytes: args.newString.length }
6982
7069
  });
6983
7070
  return `File edited: ${filePath}`;
@@ -6998,7 +7085,7 @@ var listDirTool = defineTool({
6998
7085
  const entries = await readdir4(dirPath, { withFileTypes: true });
6999
7086
  const rows = await Promise.all(
7000
7087
  entries.filter((entry) => entry.name !== "node_modules" && entry.name !== ".git").map(async (entry) => {
7001
- const fullPath = path11.join(dirPath, entry.name);
7088
+ const fullPath = path12.join(dirPath, entry.name);
7002
7089
  try {
7003
7090
  const info = await lstat2(fullPath);
7004
7091
  const type = entry.isSymbolicLink() ? "link" : entry.isDirectory() ? "dir " : "file";
@@ -7011,7 +7098,7 @@ var listDirTool = defineTool({
7011
7098
  );
7012
7099
  context.logActivity({
7013
7100
  type: "directory_listed",
7014
- message: `Listed ${path11.relative(context.worktree, dirPath) || "."}`,
7101
+ message: `Listed ${path12.relative(context.worktree, dirPath) || "."}`,
7015
7102
  metadata: { path: dirPath, entries: rows.length }
7016
7103
  });
7017
7104
  return rows.join("\n");
@@ -7130,7 +7217,7 @@ var searchTextTool = defineTool({
7130
7217
  if (cached.hit && cached.value !== void 0) {
7131
7218
  context.logActivity({
7132
7219
  type: "cache_hit",
7133
- message: `Cache hit search_text ${path12.relative(context.worktree, searchPath) || "."}`,
7220
+ message: `Cache hit search_text ${path13.relative(context.worktree, searchPath) || "."}`,
7134
7221
  metadata: { pattern: args.pattern }
7135
7222
  });
7136
7223
  return cached.value;
@@ -7155,7 +7242,7 @@ var searchTextTool = defineTool({
7155
7242
  }));
7156
7243
  context.logActivity({
7157
7244
  type: "text_search",
7158
- message: `Searched ${path12.relative(context.worktree, searchPath) || "."}`,
7245
+ message: `Searched ${path13.relative(context.worktree, searchPath) || "."}`,
7159
7246
  metadata: { pattern: args.pattern, matches: matches.length }
7160
7247
  });
7161
7248
  const output = JSON.stringify(matches, null, 2);
@@ -7195,7 +7282,7 @@ var searchFilesTool = defineTool({
7195
7282
  throw new Error(result.stderr || `ripgrep exited with ${result.exitCode}`);
7196
7283
  }
7197
7284
  const needle = args.query.toLowerCase();
7198
- const files = result.stdout.split(/\r?\n/).filter(Boolean).filter((file) => path12.basename(file).toLowerCase().includes(needle)).slice(0, 200);
7285
+ const files = result.stdout.split(/\r?\n/).filter(Boolean).filter((file) => path13.basename(file).toLowerCase().includes(needle)).slice(0, 200);
7199
7286
  context.logActivity({
7200
7287
  type: "file_search",
7201
7288
  message: `Found ${files.length} file(s)`,
@@ -7515,6 +7602,56 @@ function createDefaultToolRegistry() {
7515
7602
  registry.register(fetchWebTool);
7516
7603
  return registry;
7517
7604
  }
7605
+ var TaskSchema2 = z11.object({
7606
+ prompt: z11.string().describe("Full task description for the subagent \u2014 be specific and self-contained."),
7607
+ subagent_type: z11.string().optional().describe(
7608
+ "Named agent type from .deepcode/agents/*.md (e.g. 'code-reviewer'). When set, the subagent uses the named agent's system prompt and tool restrictions."
7609
+ ),
7610
+ provider: z11.string().optional().describe("Provider override (e.g. 'anthropic', 'openai'). Defaults to current provider."),
7611
+ model: z11.string().optional().describe("Model override. Defaults to current model."),
7612
+ fork: z11.boolean().optional().describe("If true, the subagent starts with the current conversation history as context.")
7613
+ });
7614
+ function createTaskTool(subagents, worktree) {
7615
+ return defineTool({
7616
+ name: "task",
7617
+ description: "Launch a subagent to handle a self-contained task in a child session. The subagent has full access to all tools (read, write, bash, git, search, etc.). Use for parallelizable work, delegating a well-scoped subtask, or specialized analysis. Set fork=true to give the subagent the current conversation history as starting context. Set subagent_type to the name of a named agent defined in .deepcode/agents/*.md.",
7618
+ parameters: TaskSchema2,
7619
+ execute: (args, context) => Effect10.tryPromise(async () => {
7620
+ const taskId = createId("task");
7621
+ let systemPrompt;
7622
+ let allowedTools;
7623
+ let disallowedTools;
7624
+ let resolvedModel = args.model;
7625
+ if (args.subagent_type) {
7626
+ const configs = loadAgentConfigs(worktree);
7627
+ const agentConfig = configs.find((c) => c.name === args.subagent_type);
7628
+ if (!agentConfig) {
7629
+ throw new Error(
7630
+ `Unknown subagent_type '${args.subagent_type}'. Available: ${configs.map((c) => c.name).join(", ") || "(none \u2014 create .deepcode/agents/<name>.md)"}`
7631
+ );
7632
+ }
7633
+ systemPrompt = agentConfig.systemPrompt || void 0;
7634
+ allowedTools = agentConfig.allowedTools;
7635
+ disallowedTools = agentConfig.disallowedTools;
7636
+ if (!resolvedModel && agentConfig.model) resolvedModel = agentConfig.model;
7637
+ }
7638
+ const task = {
7639
+ id: taskId,
7640
+ prompt: args.prompt,
7641
+ provider: args.provider,
7642
+ model: resolvedModel,
7643
+ systemPrompt,
7644
+ allowedTools,
7645
+ disallowedTools
7646
+ };
7647
+ const result = args.fork ? await subagents.forkFrom(context.sessionId, task, context.abortSignal) : await subagents.runOne(task, context.abortSignal);
7648
+ if (result.error) {
7649
+ throw new Error(`Subagent failed: ${result.error}`);
7650
+ }
7651
+ return result.output || "(subagent completed with no output)";
7652
+ })
7653
+ });
7654
+ }
7518
7655
  var PROJECT_MARKER2 = ".git";
7519
7656
  var SKIP_DIRS = /* @__PURE__ */ new Set([
7520
7657
  ".git",
@@ -7554,7 +7691,7 @@ async function walk(directory, depthRemaining, results, seen) {
7554
7691
  entries.filter(
7555
7692
  (e) => e.isDirectory() && !SKIP_DIRS.has(e.name) && !e.name.startsWith(".")
7556
7693
  ).map(async (e) => {
7557
- const fullPath = path13.join(directory, e.name);
7694
+ const fullPath = path14.join(directory, e.name);
7558
7695
  try {
7559
7696
  const info = await lstat3(fullPath);
7560
7697
  if (!info.isSymbolicLink()) {
@@ -7615,7 +7752,7 @@ async function enrichProjects(paths, concurrency = 8) {
7615
7752
  }
7616
7753
 
7617
7754
  // ../../packages/cli/dist/index.js
7618
- import path9 from "path";
7755
+ import path10 from "path";
7619
7756
  import { writeSync } from "fs";
7620
7757
  import { mkdtemp, rm as rm3 } from "fs/promises";
7621
7758
  import { tmpdir } from "os";
@@ -7629,10 +7766,10 @@ import { jsx, jsxs } from "react/jsx-runtime";
7629
7766
  import fs6 from "fs";
7630
7767
  import path112 from "path";
7631
7768
  import { isValidElement, useCallback as useCallback22, useEffect as useEffect25, useMemo as useMemo15, useRef as useRef16, useState as useState26 } from "react";
7632
- import { Box as Box38, Text as Text45, useInput as useInput4, useStdin as useStdin3 } from "ink";
7769
+ import { Box as Box39, Text as Text47, useInput as useInput4, useStdin as useStdin3 } from "ink";
7633
7770
  import os4 from "os";
7634
7771
  import path62 from "path";
7635
- import fs from "fs";
7772
+ import fs2 from "fs";
7636
7773
  import path42 from "path";
7637
7774
 
7638
7775
  // ../../node_modules/.pnpm/fzf@0.5.2/node_modules/fzf/dist/fzf.es.js
@@ -8766,7 +8903,7 @@ function stringWidth(string, options = {}) {
8766
8903
  // ../../packages/cli/dist/index.js
8767
8904
  import React9 from "react";
8768
8905
  import { Text as Text7, Box as Box6 } from "ink";
8769
- import * as fs2 from "fs";
8906
+ import * as fs22 from "fs";
8770
8907
  import * as path72 from "path";
8771
8908
  import * as os22 from "os";
8772
8909
  import process3 from "process";
@@ -9549,7 +9686,7 @@ import { jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
9549
9686
  import { Box as Box22, Text as Text25 } from "ink";
9550
9687
  import { jsxs as jsxs21 } from "react/jsx-runtime";
9551
9688
  import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
9552
- import { Box as Box31, Text as Text38, useIsScreenReaderEnabled as useIsScreenReaderEnabled3 } from "ink";
9689
+ import { Box as Box31, Text as Text39, useIsScreenReaderEnabled as useIsScreenReaderEnabled3 } from "ink";
9553
9690
  import { useCallback as useCallback16, useState as useState21 } from "react";
9554
9691
  import { useRef as useRef7 } from "react";
9555
9692
  import { Box as Box24, Text as Text26 } from "ink";
@@ -9583,7 +9720,7 @@ import { Box as Box26, Text as Text29 } from "ink";
9583
9720
  import chalk2 from "chalk";
9584
9721
  import { jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
9585
9722
  import { Fragment as Fragment7, jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
9586
- import { Box as Box28, Text as Text35 } from "ink";
9723
+ import { Box as Box28, Text as Text36 } from "ink";
9587
9724
  import { Text as Text31 } from "ink";
9588
9725
  import { Fragment as Fragment8, jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
9589
9726
  import { Text as Text32 } from "ink";
@@ -9592,6 +9729,8 @@ import { Text as Text33 } from "ink";
9592
9729
  import { jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
9593
9730
  import { Text as Text34 } from "ink";
9594
9731
  import { jsxs as jsxs31 } from "react/jsx-runtime";
9732
+ import { Text as Text35 } from "ink";
9733
+ import { jsxs as jsxs32 } from "react/jsx-runtime";
9595
9734
  import { useState as useState19, useEffect as useEffect222 } from "react";
9596
9735
  import { execFile as execFile22 } from "child_process";
9597
9736
  import os42 from "os";
@@ -9602,34 +9741,36 @@ import {
9602
9741
  useState as useState20
9603
9742
  } from "react";
9604
9743
  import { jsx as jsx36 } from "react/jsx-runtime";
9605
- import { jsx as jsx37, jsxs as jsxs32 } from "react/jsx-runtime";
9744
+ import { jsx as jsx37, jsxs as jsxs33 } from "react/jsx-runtime";
9606
9745
  import { useRef as useRef12 } from "react";
9607
- import { Box as Box29, Text as Text36 } from "ink";
9608
- import { jsx as jsx38, jsxs as jsxs33 } from "react/jsx-runtime";
9609
- import { Box as Box30, Text as Text37 } from "ink";
9610
- import { jsx as jsx39, jsxs as jsxs34 } from "react/jsx-runtime";
9611
- import { jsx as jsx40, jsxs as jsxs35 } from "react/jsx-runtime";
9612
- import { Box as Box32, Text as Text39 } from "ink";
9613
- import { jsx as jsx41, jsxs as jsxs36 } from "react/jsx-runtime";
9746
+ import { Box as Box29, Text as Text37 } from "ink";
9747
+ import { jsx as jsx38, jsxs as jsxs34 } from "react/jsx-runtime";
9748
+ import { Box as Box30, Text as Text38 } from "ink";
9749
+ import { jsx as jsx39, jsxs as jsxs35 } from "react/jsx-runtime";
9750
+ import { jsx as jsx40, jsxs as jsxs36 } from "react/jsx-runtime";
9751
+ import { Box as Box32, Text as Text40 } from "ink";
9752
+ import { jsx as jsx41, jsxs as jsxs37 } from "react/jsx-runtime";
9614
9753
  import { useCallback as useCallback17, useMemo as useMemo10, useRef as useRef13 } from "react";
9615
- import { Box as Box33, Text as Text40 } from "ink";
9616
- import { jsx as jsx42, jsxs as jsxs37 } from "react/jsx-runtime";
9754
+ import { Box as Box33, Text as Text41 } from "ink";
9755
+ import { jsx as jsx42, jsxs as jsxs38 } from "react/jsx-runtime";
9617
9756
  import { useCallback as useCallback18, useMemo as useMemo11, useState as useState222 } from "react";
9618
- import { Box as Box34, Text as Text41, useInput as useInput2 } from "ink";
9619
- import { Fragment as Fragment9, jsx as jsx43, jsxs as jsxs38 } from "react/jsx-runtime";
9757
+ import { Box as Box34, Text as Text42, useInput as useInput2 } from "ink";
9758
+ import { Fragment as Fragment9, jsx as jsx43, jsxs as jsxs39 } from "react/jsx-runtime";
9620
9759
  import { useCallback as useCallback19, useMemo as useMemo12, useState as useState23 } from "react";
9621
- import { Box as Box35, Text as Text42 } from "ink";
9622
- import { jsx as jsx44, jsxs as jsxs39 } from "react/jsx-runtime";
9760
+ import { Box as Box35, Text as Text43 } from "ink";
9761
+ import { jsx as jsx44, jsxs as jsxs40 } from "react/jsx-runtime";
9623
9762
  import { useCallback as useCallback20, useEffect as useEffect23, useMemo as useMemo13, useRef as useRef14, useState as useState24 } from "react";
9624
- import { Box as Box36, Text as Text43 } from "ink";
9625
- import { jsx as jsx45, jsxs as jsxs40 } from "react/jsx-runtime";
9763
+ import { Box as Box36, Text as Text44 } from "ink";
9764
+ import { jsx as jsx45, jsxs as jsxs41 } from "react/jsx-runtime";
9626
9765
  import { useCallback as useCallback21, useEffect as useEffect24, useMemo as useMemo14, useRef as useRef15, useState as useState25 } from "react";
9627
- import { Box as Box37, Text as Text44, useInput as useInput3 } from "ink";
9628
- import { jsx as jsx46, jsxs as jsxs41 } from "react/jsx-runtime";
9629
- import { jsx as jsx47, jsxs as jsxs42 } from "react/jsx-runtime";
9630
- import { jsx as jsx48 } from "react/jsx-runtime";
9766
+ import { Box as Box37, Text as Text45, useInput as useInput3 } from "ink";
9767
+ import { jsx as jsx46, jsxs as jsxs42 } from "react/jsx-runtime";
9768
+ import { Box as Box38, Text as Text46 } from "ink";
9769
+ import { jsx as jsx47, jsxs as jsxs43 } from "react/jsx-runtime";
9770
+ import { jsx as jsx48, jsxs as jsxs44 } from "react/jsx-runtime";
9771
+ import { jsx as jsx49 } from "react/jsx-runtime";
9631
9772
  async function createRuntime(options) {
9632
- const worktree = path9.resolve(options.cwd);
9773
+ const worktree = path10.resolve(options.cwd);
9633
9774
  const config = await new ConfigLoader().load({ cwd: worktree, configPath: options.configPath });
9634
9775
  const events = new EventBus();
9635
9776
  const pathSecurity = new PathSecurity(worktree, config.paths);
@@ -9669,8 +9810,10 @@ async function createRuntime(options) {
9669
9810
  sessions,
9670
9811
  defaultTarget.provider,
9671
9812
  defaultTarget.model,
9672
- config.subagentConcurrency
9813
+ config.subagentConcurrency,
9814
+ events
9673
9815
  );
9816
+ tools.register(createTaskTool(subagents, worktree));
9674
9817
  return {
9675
9818
  config,
9676
9819
  events,
@@ -10794,7 +10937,7 @@ var ProjectFileSearch = class {
10794
10937
  if (depth > maxDepth || out.length >= MAX_FILES) return;
10795
10938
  let entries;
10796
10939
  try {
10797
- entries = fs.readdirSync(dir, { withFileTypes: true });
10940
+ entries = fs2.readdirSync(dir, { withFileTypes: true });
10798
10941
  } catch {
10799
10942
  return;
10800
10943
  }
@@ -14610,7 +14753,7 @@ var ThemeManager = class {
14610
14753
  }
14611
14754
  loadThemeFromFile(themePath) {
14612
14755
  try {
14613
- const canonicalPath = fs2.realpathSync(path72.resolve(themePath));
14756
+ const canonicalPath = fs22.realpathSync(path72.resolve(themePath));
14614
14757
  if (this.customThemes.has(canonicalPath)) {
14615
14758
  return this.customThemes.get(canonicalPath);
14616
14759
  }
@@ -14621,7 +14764,7 @@ var ThemeManager = class {
14621
14764
  );
14622
14765
  return void 0;
14623
14766
  }
14624
- const themeContent = fs2.readFileSync(canonicalPath, "utf-8");
14767
+ const themeContent = fs22.readFileSync(canonicalPath, "utf-8");
14625
14768
  const customThemeConfig = JSON.parse(themeContent);
14626
14769
  const validation = validateCustomTheme(customThemeConfig);
14627
14770
  if (!validation.isValid) {
@@ -17554,12 +17697,12 @@ var TodoDisplay = ({ todos }) => {
17554
17697
  return /* @__PURE__ */ jsx12(Box10, { flexDirection: "column", children: todos.map((todo) => /* @__PURE__ */ jsx12(TodoItemRow, { todo }, todo.id)) });
17555
17698
  };
17556
17699
  var TodoItemRow = ({ todo }) => {
17557
- const statusIcon = STATUS_ICONS[todo.status];
17700
+ const statusIcon2 = STATUS_ICONS[todo.status];
17558
17701
  const isCompleted = todo.status === "completed";
17559
17702
  const isInProgress = todo.status === "in_progress";
17560
17703
  const itemColor = isCompleted ? Colors.Foreground : isInProgress ? Colors.AccentGreen : Colors.Foreground;
17561
17704
  return /* @__PURE__ */ jsxs9(Box10, { flexDirection: "row", minHeight: 1, children: [
17562
- /* @__PURE__ */ jsx12(Box10, { width: 3, children: /* @__PURE__ */ jsx12(Text11, { color: itemColor, children: statusIcon }) }),
17705
+ /* @__PURE__ */ jsx12(Box10, { width: 3, children: /* @__PURE__ */ jsx12(Text11, { color: itemColor, children: statusIcon2 }) }),
17563
17706
  /* @__PURE__ */ jsx12(Box10, { flexGrow: 1, children: /* @__PURE__ */ jsx12(Text11, { color: itemColor, strikethrough: isCompleted, wrap: "wrap", children: todo.content }) })
17564
17707
  ] });
17565
17708
  };
@@ -22470,7 +22613,7 @@ var ToolStatusIndicator = ({
22470
22613
  name
22471
22614
  }) => {
22472
22615
  const isShell = name === SHELL_COMMAND_NAME || name === SHELL_NAME;
22473
- const statusColor2 = isShell ? theme.ui.symbol : theme.status.warning;
22616
+ const statusColor3 = isShell ? theme.ui.symbol : theme.status.warning;
22474
22617
  return /* @__PURE__ */ jsxs16(Box16, { minWidth: STATUS_INDICATOR_WIDTH, children: [
22475
22618
  status === "Pending" && /* @__PURE__ */ jsx21(Text19, { color: theme.status.success, children: TOOL_STATUS.PENDING }),
22476
22619
  status === "Executing" && /* @__PURE__ */ jsx21(
@@ -22481,8 +22624,8 @@ var ToolStatusIndicator = ({
22481
22624
  }
22482
22625
  ),
22483
22626
  status === "Success" && /* @__PURE__ */ jsx21(Text19, { color: theme.status.success, "aria-label": "Success:", children: TOOL_STATUS.SUCCESS }),
22484
- status === "Confirming" && /* @__PURE__ */ jsx21(Text19, { color: statusColor2, "aria-label": "Confirming:", children: TOOL_STATUS.CONFIRMING }),
22485
- status === "Canceled" && /* @__PURE__ */ jsx21(Text19, { color: statusColor2, "aria-label": "Canceled:", bold: true, children: TOOL_STATUS.CANCELED }),
22627
+ status === "Confirming" && /* @__PURE__ */ jsx21(Text19, { color: statusColor3, "aria-label": "Confirming:", children: TOOL_STATUS.CONFIRMING }),
22628
+ status === "Canceled" && /* @__PURE__ */ jsx21(Text19, { color: statusColor3, "aria-label": "Canceled:", bold: true, children: TOOL_STATUS.CANCELED }),
22486
22629
  status === "Error" && /* @__PURE__ */ jsx21(Text19, { color: theme.status.error, "aria-label": "Error:", bold: true, children: TOOL_STATUS.ERROR })
22487
22630
  ] });
22488
22631
  };
@@ -26727,23 +26870,23 @@ ${currentText}`);
26727
26870
  }, [promptSuggestion]);
26728
26871
  const showAutoAcceptStyling = !shellModeActive && approvalMode === "auto-edit";
26729
26872
  const showYoloStyling = !shellModeActive && approvalMode === "yolo";
26730
- let statusColor2;
26873
+ let statusColor3;
26731
26874
  let statusText = "";
26732
26875
  if (shellModeActive) {
26733
- statusColor2 = theme.ui.symbol;
26876
+ statusColor3 = theme.ui.symbol;
26734
26877
  statusText = t("Shell mode");
26735
26878
  } else if (showYoloStyling) {
26736
- statusColor2 = theme.status.errorDim;
26879
+ statusColor3 = theme.status.errorDim;
26737
26880
  statusText = t("YOLO mode");
26738
26881
  } else if (showAutoAcceptStyling) {
26739
- statusColor2 = theme.status.warningDim;
26882
+ statusColor3 = theme.status.warningDim;
26740
26883
  statusText = t("Accepting edits");
26741
26884
  }
26742
- const borderColor = isShellFocused && !isEmbeddedShellFocused && !agentTabBarFocused ? statusColor2 ?? theme.border.focused : theme.border.default;
26885
+ const borderColor = isShellFocused && !isEmbeddedShellFocused && !agentTabBarFocused ? statusColor3 ?? theme.border.focused : theme.border.default;
26743
26886
  const prefixNode = /* @__PURE__ */ jsxs27(
26744
26887
  Text30,
26745
26888
  {
26746
- color: statusColor2 ?? theme.text.accent,
26889
+ color: statusColor3 ?? theme.text.accent,
26747
26890
  "aria-label": statusText || void 0,
26748
26891
  children: [
26749
26892
  shellModeActive ? reverseSearchActive ? /* @__PURE__ */ jsxs27(Text30, { color: theme.text.link, "aria-label": SCREEN_READER_USER_PREFIX, children: [
@@ -26868,13 +27011,21 @@ var ShellModeIndicator = () => /* @__PURE__ */ jsxs30(Text33, { color: theme.ui.
26868
27011
  /* @__PURE__ */ jsx35(Text33, { color: theme.text.secondary, children: " (esc to disable)" })
26869
27012
  ] });
26870
27013
  function BackgroundTasksPill() {
26871
- return null;
27014
+ const { activeSubagents } = useUIState();
27015
+ const running = activeSubagents.filter((s) => s.status === "running").length;
27016
+ if (running <= 0) return null;
27017
+ return /* @__PURE__ */ jsxs31(Text34, { color: theme.text.accent, children: [
27018
+ " ",
27019
+ running,
27020
+ " task",
27021
+ running !== 1 ? "s" : ""
27022
+ ] });
26872
27023
  }
26873
27024
  function MCPHealthPill() {
26874
27025
  const { mcpConnected, mcpTotal } = useUIState();
26875
27026
  if (mcpTotal === 0) return null;
26876
27027
  const color = mcpConnected === mcpTotal ? theme.status.success : theme.status.warning;
26877
- return /* @__PURE__ */ jsxs31(Text34, { color, children: [
27028
+ return /* @__PURE__ */ jsxs32(Text35, { color, children: [
26878
27029
  " MCP ",
26879
27030
  mcpConnected,
26880
27031
  "/",
@@ -26951,16 +27102,16 @@ var Footer = () => {
26951
27102
  const debugMode = config.getDebugMode();
26952
27103
  const contextWindowSize = config.getContentGeneratorConfig()?.contextWindowSize;
26953
27104
  const suppressHint = statusLineLines.length > 0;
26954
- const leftBottomContent = uiState.ctrlCPressedOnce ? /* @__PURE__ */ jsx37(Text35, { color: theme.status.warning, children: t("Press Ctrl+C again to exit.") }) : uiState.ctrlDPressedOnce ? /* @__PURE__ */ jsx37(Text35, { color: theme.status.warning, children: t("Press Ctrl+D again to exit.") }) : uiState.showEscapePrompt ? /* @__PURE__ */ jsx37(Text35, { color: theme.text.secondary, children: t("Press Esc again to clear.") }) : uiState.rewindEscPending ? /* @__PURE__ */ jsx37(Text35, { color: theme.text.secondary, children: t("Press Esc again to rewind conversation.") }) : vimEnabled && vimMode === "INSERT" ? /* @__PURE__ */ jsx37(Text35, { color: theme.text.secondary, children: "-- INSERT --" }) : uiState.shellModeActive ? /* @__PURE__ */ jsx37(ShellModeIndicator, {}) : configInitMessage ? /* @__PURE__ */ jsxs32(Text35, { color: theme.text.secondary, children: [
27105
+ const leftBottomContent = uiState.ctrlCPressedOnce ? /* @__PURE__ */ jsx37(Text36, { color: theme.status.warning, children: t("Press Ctrl+C again to exit.") }) : uiState.ctrlDPressedOnce ? /* @__PURE__ */ jsx37(Text36, { color: theme.status.warning, children: t("Press Ctrl+D again to exit.") }) : uiState.showEscapePrompt ? /* @__PURE__ */ jsx37(Text36, { color: theme.text.secondary, children: t("Press Esc again to clear.") }) : uiState.rewindEscPending ? /* @__PURE__ */ jsx37(Text36, { color: theme.text.secondary, children: t("Press Esc again to rewind conversation.") }) : vimEnabled && vimMode === "INSERT" ? /* @__PURE__ */ jsx37(Text36, { color: theme.text.secondary, children: "-- INSERT --" }) : uiState.shellModeActive ? /* @__PURE__ */ jsx37(ShellModeIndicator, {}) : configInitMessage ? /* @__PURE__ */ jsxs33(Text36, { color: theme.text.secondary, children: [
26955
27106
  /* @__PURE__ */ jsx37(GeminiSpinner, {}),
26956
27107
  " ",
26957
27108
  configInitMessage
26958
- ] }) : showAutoAcceptIndicator !== void 0 && showAutoAcceptIndicator !== "default" ? /* @__PURE__ */ jsx37(AutoAcceptIndicator, { approvalMode: showAutoAcceptIndicator }) : suppressHint ? null : /* @__PURE__ */ jsx37(Text35, { color: theme.text.secondary, children: t("? for shortcuts") });
27109
+ ] }) : showAutoAcceptIndicator !== void 0 && showAutoAcceptIndicator !== "default" ? /* @__PURE__ */ jsx37(AutoAcceptIndicator, { approvalMode: showAutoAcceptIndicator }) : suppressHint ? null : /* @__PURE__ */ jsx37(Text36, { color: theme.text.secondary, children: t("? for shortcuts") });
26959
27110
  const rightItems = [];
26960
27111
  if (sandboxInfo) {
26961
27112
  rightItems.push({
26962
27113
  key: "sandbox",
26963
- node: /* @__PURE__ */ jsxs32(Text35, { color: theme.status.success, children: [
27114
+ node: /* @__PURE__ */ jsxs33(Text36, { color: theme.status.success, children: [
26964
27115
  "\u{1F512} ",
26965
27116
  sandboxInfo
26966
27117
  ] })
@@ -26969,13 +27120,13 @@ var Footer = () => {
26969
27120
  if (debugMode) {
26970
27121
  rightItems.push({
26971
27122
  key: "debug",
26972
- node: /* @__PURE__ */ jsx37(Text35, { color: theme.status.warning, children: "Debug Mode" })
27123
+ node: /* @__PURE__ */ jsx37(Text36, { color: theme.status.warning, children: "Debug Mode" })
26973
27124
  });
26974
27125
  }
26975
27126
  if (promptTokenCount > 0 && contextWindowSize) {
26976
27127
  rightItems.push({
26977
27128
  key: "context",
26978
- node: /* @__PURE__ */ jsx37(Text35, { color: theme.text.accent, children: /* @__PURE__ */ jsx37(
27129
+ node: /* @__PURE__ */ jsx37(Text36, { color: theme.text.accent, children: /* @__PURE__ */ jsx37(
26979
27130
  ContextUsageDisplay,
26980
27131
  {
26981
27132
  promptTokenCount,
@@ -26985,7 +27136,7 @@ var Footer = () => {
26985
27136
  ) })
26986
27137
  });
26987
27138
  }
26988
- return /* @__PURE__ */ jsxs32(
27139
+ return /* @__PURE__ */ jsxs33(
26989
27140
  Box28,
26990
27141
  {
26991
27142
  flexDirection: isNarrow ? "column" : "row",
@@ -26994,16 +27145,16 @@ var Footer = () => {
26994
27145
  paddingX: 2,
26995
27146
  gap: isNarrow ? 0 : 1,
26996
27147
  children: [
26997
- /* @__PURE__ */ jsxs32(Box28, { flexDirection: "column", flexShrink: isNarrow ? 0 : 1, children: [
26998
- statusLineLines.length > 0 && !uiState.ctrlCPressedOnce && !uiState.ctrlDPressedOnce && statusLineLines.map((line, i) => /* @__PURE__ */ jsx37(Text35, { dimColor: true, wrap: "truncate", children: line }, `status-line-${i}`)),
26999
- /* @__PURE__ */ jsxs32(Box28, { flexDirection: "row", flexShrink: 1, children: [
27000
- /* @__PURE__ */ jsx37(Text35, { wrap: "truncate", children: leftBottomContent }),
27148
+ /* @__PURE__ */ jsxs33(Box28, { flexDirection: "column", flexShrink: isNarrow ? 0 : 1, children: [
27149
+ statusLineLines.length > 0 && !uiState.ctrlCPressedOnce && !uiState.ctrlDPressedOnce && statusLineLines.map((line, i) => /* @__PURE__ */ jsx37(Text36, { dimColor: true, wrap: "truncate", children: line }, `status-line-${i}`)),
27150
+ /* @__PURE__ */ jsxs33(Box28, { flexDirection: "row", flexShrink: 1, children: [
27151
+ /* @__PURE__ */ jsx37(Text36, { wrap: "truncate", children: leftBottomContent }),
27001
27152
  /* @__PURE__ */ jsx37(BackgroundTasksPill, {}),
27002
27153
  /* @__PURE__ */ jsx37(MCPHealthPill, {})
27003
27154
  ] })
27004
27155
  ] }),
27005
- /* @__PURE__ */ jsx37(Box28, { flexShrink: 0, gap: 1, alignItems: "flex-start", children: rightItems.map(({ key, node }, index) => /* @__PURE__ */ jsxs32(Box28, { alignItems: "center", children: [
27006
- index > 0 && /* @__PURE__ */ jsx37(Text35, { color: theme.text.secondary, children: " | " }),
27156
+ /* @__PURE__ */ jsx37(Box28, { flexShrink: 0, gap: 1, alignItems: "flex-start", children: rightItems.map(({ key, node }, index) => /* @__PURE__ */ jsxs33(Box28, { alignItems: "center", children: [
27157
+ index > 0 && /* @__PURE__ */ jsx37(Text36, { color: theme.text.secondary, children: " | " }),
27007
27158
  node
27008
27159
  ] }, key)) })
27009
27160
  ]
@@ -27026,17 +27177,17 @@ var QueuedMessageDisplay = ({
27026
27177
  wasEmptyRef.current = false;
27027
27178
  }
27028
27179
  const showHint = hintSeenCountRef.current <= NUM_TIMES_QUEUE_HINT_SHOWN;
27029
- return /* @__PURE__ */ jsxs33(Box29, { flexDirection: "column", marginTop: 1, children: [
27180
+ return /* @__PURE__ */ jsxs34(Box29, { flexDirection: "column", marginTop: 1, children: [
27030
27181
  messageQueue.slice(0, MAX_DISPLAYED_QUEUED_MESSAGES).map((message, index) => {
27031
27182
  const preview = message.replace(/\s+/g, " ");
27032
- return /* @__PURE__ */ jsx38(Box29, { paddingLeft: 2, width: "100%", children: /* @__PURE__ */ jsx38(Text36, { dimColor: true, wrap: "truncate", children: preview }) }, index);
27183
+ return /* @__PURE__ */ jsx38(Box29, { paddingLeft: 2, width: "100%", children: /* @__PURE__ */ jsx38(Text37, { dimColor: true, wrap: "truncate", children: preview }) }, index);
27033
27184
  }),
27034
- messageQueue.length > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */ jsx38(Box29, { paddingLeft: 2, children: /* @__PURE__ */ jsxs33(Text36, { dimColor: true, children: [
27185
+ messageQueue.length > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */ jsx38(Box29, { paddingLeft: 2, children: /* @__PURE__ */ jsxs34(Text37, { dimColor: true, children: [
27035
27186
  "... (+",
27036
27187
  messageQueue.length - MAX_DISPLAYED_QUEUED_MESSAGES,
27037
27188
  " more)"
27038
27189
  ] }) }),
27039
- showHint && /* @__PURE__ */ jsx38(Box29, { paddingLeft: 2, children: /* @__PURE__ */ jsx38(Text36, { dimColor: true, italic: true, children: t("Press \u2191 to edit queued messages") }) })
27190
+ showHint && /* @__PURE__ */ jsx38(Box29, { paddingLeft: 2, children: /* @__PURE__ */ jsx38(Text37, { dimColor: true, italic: true, children: t("Press \u2191 to edit queued messages") }) })
27040
27191
  ] });
27041
27192
  };
27042
27193
  var getNewlineKey = () => process.platform === "win32" ? "ctrl+enter" : "ctrl+j";
@@ -27064,8 +27215,8 @@ var getShortcuts = () => [
27064
27215
  { key: getExternalEditorKey(), description: t("for external editor") },
27065
27216
  { key: "ctrl+o", description: t("to toggle compact mode") }
27066
27217
  ];
27067
- var ShortcutItem = ({ shortcut }) => /* @__PURE__ */ jsxs34(Text37, { color: theme.text.secondary, children: [
27068
- /* @__PURE__ */ jsx39(Text37, { color: theme.text.accent, children: shortcut.key }),
27218
+ var ShortcutItem = ({ shortcut }) => /* @__PURE__ */ jsxs35(Text38, { color: theme.text.secondary, children: [
27219
+ /* @__PURE__ */ jsx39(Text38, { color: theme.text.accent, children: shortcut.key }),
27069
27220
  " ",
27070
27221
  shortcut.description
27071
27222
  ] });
@@ -27161,7 +27312,7 @@ var Composer = () => {
27161
27312
  },
27162
27313
  [uiActions]
27163
27314
  );
27164
- return /* @__PURE__ */ jsxs35(Box31, { flexDirection: "column", marginTop: 1, children: [
27315
+ return /* @__PURE__ */ jsxs36(Box31, { flexDirection: "column", marginTop: 1, children: [
27165
27316
  !uiState.embeddedShellFocused && !suppressBottomLoadingIndicator && /* @__PURE__ */ jsx40(
27166
27317
  LoadingIndicator,
27167
27318
  {
@@ -27174,7 +27325,7 @@ var Composer = () => {
27174
27325
  isReceivingContent
27175
27326
  }
27176
27327
  ),
27177
- !uiState.embeddedShellFocused && suppressBottomLoadingIndicator && /* @__PURE__ */ jsx40(Box31, { paddingLeft: 2, children: /* @__PURE__ */ jsxs35(Text38, { color: theme.text.secondary, children: [
27328
+ !uiState.embeddedShellFocused && suppressBottomLoadingIndicator && /* @__PURE__ */ jsx40(Box31, { paddingLeft: 2, children: /* @__PURE__ */ jsxs36(Text39, { color: theme.text.secondary, children: [
27178
27329
  "(",
27179
27330
  t("Esc to cancel"),
27180
27331
  ")"
@@ -27582,10 +27733,10 @@ var CommandDialog = ({
27582
27733
  title,
27583
27734
  lines,
27584
27735
  footerText = "Press Esc or Enter to close."
27585
- }) => /* @__PURE__ */ jsx41(Box32, { marginLeft: 2, marginRight: 2, marginTop: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs36(Box32, { borderStyle: "round", borderColor: theme.border.default, padding: 1, flexDirection: "column", children: [
27586
- /* @__PURE__ */ jsx41(Text39, { bold: true, color: theme.text.accent, children: title }),
27587
- /* @__PURE__ */ jsx41(Box32, { marginTop: 1, flexDirection: "column", children: lines.map((line, index) => /* @__PURE__ */ jsx41(Text39, { color: theme.text.primary, children: line }, index)) }),
27588
- /* @__PURE__ */ jsx41(Box32, { marginTop: 1, children: /* @__PURE__ */ jsx41(Text39, { color: theme.text.secondary, children: footerText }) })
27736
+ }) => /* @__PURE__ */ jsx41(Box32, { marginLeft: 2, marginRight: 2, marginTop: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs37(Box32, { borderStyle: "round", borderColor: theme.border.default, padding: 1, flexDirection: "column", children: [
27737
+ /* @__PURE__ */ jsx41(Text40, { bold: true, color: theme.text.accent, children: title }),
27738
+ /* @__PURE__ */ jsx41(Box32, { marginTop: 1, flexDirection: "column", children: lines.map((line, index) => /* @__PURE__ */ jsx41(Text40, { color: theme.text.primary, children: line }, index)) }),
27739
+ /* @__PURE__ */ jsx41(Box32, { marginTop: 1, children: /* @__PURE__ */ jsx41(Text40, { color: theme.text.secondary, children: footerText }) })
27589
27740
  ] }) });
27590
27741
  var ThemeDialog = ({ onSelect, onClose, onPreview }) => {
27591
27742
  const originalTheme = useRef13(themeManager.getActiveTheme().name);
@@ -27622,7 +27773,7 @@ var ThemeDialog = ({ onSelect, onClose, onPreview }) => {
27622
27773
  },
27623
27774
  [onPreview]
27624
27775
  );
27625
- return /* @__PURE__ */ jsxs37(
27776
+ return /* @__PURE__ */ jsxs38(
27626
27777
  Box33,
27627
27778
  {
27628
27779
  flexDirection: "column",
@@ -27632,7 +27783,7 @@ var ThemeDialog = ({ onSelect, onClose, onPreview }) => {
27632
27783
  marginLeft: 2,
27633
27784
  marginRight: 2,
27634
27785
  children: [
27635
- /* @__PURE__ */ jsx42(Text40, { bold: true, color: theme.text.accent, children: "Select theme" }),
27786
+ /* @__PURE__ */ jsx42(Text41, { bold: true, color: theme.text.accent, children: "Select theme" }),
27636
27787
  /* @__PURE__ */ jsx42(
27637
27788
  RadioButtonSelect,
27638
27789
  {
@@ -27643,7 +27794,7 @@ var ThemeDialog = ({ onSelect, onClose, onPreview }) => {
27643
27794
  isFocused: true
27644
27795
  }
27645
27796
  ),
27646
- /* @__PURE__ */ jsx42(Text40, { color: theme.text.secondary, children: "\u2191\u2193 navigate \xB7 Enter apply \xB7 Esc cancel" })
27797
+ /* @__PURE__ */ jsx42(Text41, { color: theme.text.secondary, children: "\u2191\u2193 navigate \xB7 Enter apply \xB7 Esc cancel" })
27647
27798
  ]
27648
27799
  }
27649
27800
  );
@@ -27871,9 +28022,9 @@ var ProviderDialog = ({
27871
28022
  },
27872
28023
  { isActive: phase === "apiKey" }
27873
28024
  );
27874
- const statusColor2 = status ? status.ok ? status.text.startsWith("\u2713") ? theme.status.success : theme.text.secondary : theme.status.error : void 0;
28025
+ const statusColor3 = status ? status.ok ? status.text.startsWith("\u2713") ? theme.status.success : theme.text.secondary : theme.status.error : void 0;
27875
28026
  const footer = phase === "apiKey" ? "Enter save Ctrl+U clear Esc cancel" : phase === "providers" ? "\u2191\u2193 navigate Enter select Esc close" : "\u2191\u2193 navigate Enter confirm Esc back";
27876
- return /* @__PURE__ */ jsxs38(
28027
+ return /* @__PURE__ */ jsxs39(
27877
28028
  Box34,
27878
28029
  {
27879
28030
  flexDirection: "column",
@@ -27885,13 +28036,13 @@ var ProviderDialog = ({
27885
28036
  marginRight: 2,
27886
28037
  minWidth: 44,
27887
28038
  children: [
27888
- /* @__PURE__ */ jsxs38(Box34, { marginBottom: 1, gap: 1, children: [
27889
- /* @__PURE__ */ jsx43(Text41, { bold: true, color: theme.text.accent, children: "Providers" }),
27890
- phase !== "providers" && /* @__PURE__ */ jsxs38(Fragment9, { children: [
27891
- /* @__PURE__ */ jsx43(Text41, { color: theme.text.secondary, children: "\u203A" }),
27892
- /* @__PURE__ */ jsx43(Text41, { bold: true, color: theme.text.primary, children: selectedProvider })
28039
+ /* @__PURE__ */ jsxs39(Box34, { marginBottom: 1, gap: 1, children: [
28040
+ /* @__PURE__ */ jsx43(Text42, { bold: true, color: theme.text.accent, children: "Providers" }),
28041
+ phase !== "providers" && /* @__PURE__ */ jsxs39(Fragment9, { children: [
28042
+ /* @__PURE__ */ jsx43(Text42, { color: theme.text.secondary, children: "\u203A" }),
28043
+ /* @__PURE__ */ jsx43(Text42, { bold: true, color: theme.text.primary, children: selectedProvider })
27893
28044
  ] }),
27894
- phase === "providers" && currentModel && /* @__PURE__ */ jsxs38(Text41, { color: theme.text.secondary, children: [
28045
+ phase === "providers" && currentModel && /* @__PURE__ */ jsxs39(Text42, { color: theme.text.secondary, children: [
27895
28046
  " (",
27896
28047
  currentModel,
27897
28048
  ")"
@@ -27907,23 +28058,23 @@ var ProviderDialog = ({
27907
28058
  maxItemsToShow: 8,
27908
28059
  renderItem: (item, { titleColor }) => {
27909
28060
  const { icon, color, label } = getStatusMark(item.provider, item.keyIsSet);
27910
- return /* @__PURE__ */ jsxs38(Box34, { gap: 1, children: [
27911
- /* @__PURE__ */ jsx43(Text41, { color, children: icon }),
27912
- /* @__PURE__ */ jsx43(Text41, { color: titleColor, bold: item.isCurrent, children: item.provider.padEnd(12) }),
27913
- /* @__PURE__ */ jsx43(Text41, { color, dimColor: !item.keyIsSet && !item.isLocal, children: label }),
27914
- item.isCurrent && /* @__PURE__ */ jsx43(Text41, { color: theme.text.accent, children: "\u25B6" })
28061
+ return /* @__PURE__ */ jsxs39(Box34, { gap: 1, children: [
28062
+ /* @__PURE__ */ jsx43(Text42, { color, children: icon }),
28063
+ /* @__PURE__ */ jsx43(Text42, { color: titleColor, bold: item.isCurrent, children: item.provider.padEnd(12) }),
28064
+ /* @__PURE__ */ jsx43(Text42, { color, dimColor: !item.keyIsSet && !item.isLocal, children: label }),
28065
+ item.isCurrent && /* @__PURE__ */ jsx43(Text42, { color: theme.text.accent, children: "\u25B6" })
27915
28066
  ] });
27916
28067
  }
27917
28068
  }
27918
28069
  ),
27919
- phase === "actions" && /* @__PURE__ */ jsxs38(Fragment9, { children: [
27920
- /* @__PURE__ */ jsxs38(Box34, { marginBottom: 1, gap: 1, children: [
27921
- /* @__PURE__ */ jsx43(Text41, { color: theme.ui.comment, children: "session" }),
27922
- /* @__PURE__ */ jsx43(Text41, { color: selectedProvider === currentProvider ? theme.text.accent : theme.text.secondary, children: selectedProvider === currentProvider ? "active" : `still using ${currentProvider}` })
28070
+ phase === "actions" && /* @__PURE__ */ jsxs39(Fragment9, { children: [
28071
+ /* @__PURE__ */ jsxs39(Box34, { marginBottom: 1, gap: 1, children: [
28072
+ /* @__PURE__ */ jsx43(Text42, { color: theme.ui.comment, children: "session" }),
28073
+ /* @__PURE__ */ jsx43(Text42, { color: selectedProvider === currentProvider ? theme.text.accent : theme.text.secondary, children: selectedProvider === currentProvider ? "active" : `still using ${currentProvider}` })
27923
28074
  ] }),
27924
- /* @__PURE__ */ jsxs38(Box34, { marginBottom: 1, gap: 1, children: [
27925
- /* @__PURE__ */ jsx43(Text41, { color: theme.ui.comment, children: "key" }),
27926
- isLocal ? /* @__PURE__ */ jsx43(Text41, { color: theme.text.accent, children: "no key required" }) : keyHint ? /* @__PURE__ */ jsx43(Text41, { color: theme.text.secondary, children: keyHint }) : /* @__PURE__ */ jsx43(Text41, { color: theme.ui.comment, dimColor: true, children: "not configured" })
28075
+ /* @__PURE__ */ jsxs39(Box34, { marginBottom: 1, gap: 1, children: [
28076
+ /* @__PURE__ */ jsx43(Text42, { color: theme.ui.comment, children: "key" }),
28077
+ isLocal ? /* @__PURE__ */ jsx43(Text42, { color: theme.text.accent, children: "no key required" }) : keyHint ? /* @__PURE__ */ jsx43(Text42, { color: theme.text.secondary, children: keyHint }) : /* @__PURE__ */ jsx43(Text42, { color: theme.ui.comment, dimColor: true, children: "not configured" })
27927
28078
  ] }),
27928
28079
  /* @__PURE__ */ jsx43(
27929
28080
  BaseSelectionList,
@@ -27933,10 +28084,10 @@ var ProviderDialog = ({
27933
28084
  isFocused: !isBusy,
27934
28085
  showNumbers: false,
27935
28086
  maxItemsToShow: 6,
27936
- renderItem: (item, { titleColor }) => /* @__PURE__ */ jsxs38(Box34, { gap: 1, children: [
27937
- /* @__PURE__ */ jsx43(Text41, { color: titleColor, children: item.icon }),
27938
- /* @__PURE__ */ jsx43(Text41, { color: titleColor, children: item.label }),
27939
- item.hint && /* @__PURE__ */ jsxs38(Text41, { color: theme.ui.comment, dimColor: true, children: [
28087
+ renderItem: (item, { titleColor }) => /* @__PURE__ */ jsxs39(Box34, { gap: 1, children: [
28088
+ /* @__PURE__ */ jsx43(Text42, { color: titleColor, children: item.icon }),
28089
+ /* @__PURE__ */ jsx43(Text42, { color: titleColor, children: item.label }),
28090
+ item.hint && /* @__PURE__ */ jsxs39(Text42, { color: theme.ui.comment, dimColor: true, children: [
27940
28091
  "(",
27941
28092
  item.hint,
27942
28093
  ")"
@@ -27945,23 +28096,23 @@ var ProviderDialog = ({
27945
28096
  }
27946
28097
  )
27947
28098
  ] }),
27948
- phase === "apiKey" && /* @__PURE__ */ jsxs38(Box34, { flexDirection: "column", gap: 1, marginBottom: 1, children: [
27949
- /* @__PURE__ */ jsxs38(Box34, { gap: 1, children: [
27950
- /* @__PURE__ */ jsx43(Text41, { color: theme.ui.comment, children: "current" }),
27951
- isLocal ? /* @__PURE__ */ jsx43(Text41, { color: theme.text.accent, children: "no key required" }) : keyHint ? /* @__PURE__ */ jsx43(Text41, { color: theme.text.secondary, children: keyHint }) : /* @__PURE__ */ jsx43(Text41, { color: theme.ui.comment, dimColor: true, children: "not set" })
28099
+ phase === "apiKey" && /* @__PURE__ */ jsxs39(Box34, { flexDirection: "column", gap: 1, marginBottom: 1, children: [
28100
+ /* @__PURE__ */ jsxs39(Box34, { gap: 1, children: [
28101
+ /* @__PURE__ */ jsx43(Text42, { color: theme.ui.comment, children: "current" }),
28102
+ isLocal ? /* @__PURE__ */ jsx43(Text42, { color: theme.text.accent, children: "no key required" }) : keyHint ? /* @__PURE__ */ jsx43(Text42, { color: theme.text.secondary, children: keyHint }) : /* @__PURE__ */ jsx43(Text42, { color: theme.ui.comment, dimColor: true, children: "not set" })
27952
28103
  ] }),
27953
- /* @__PURE__ */ jsxs38(Box34, { gap: 1, children: [
27954
- /* @__PURE__ */ jsx43(Text41, { color: theme.ui.comment, children: "new key" }),
27955
- /* @__PURE__ */ jsx43(Box34, { borderStyle: "single", borderColor: theme.border.focused, paddingX: 1, children: /* @__PURE__ */ jsx43(Text41, { color: theme.text.accent, children: apiKeyInput.length > 0 ? maskApiKeyInput(apiKeyInput.length) : /* @__PURE__ */ jsx43(Text41, { color: theme.ui.comment, dimColor: true, children: "paste or type\u2026" }) }) })
28104
+ /* @__PURE__ */ jsxs39(Box34, { gap: 1, children: [
28105
+ /* @__PURE__ */ jsx43(Text42, { color: theme.ui.comment, children: "new key" }),
28106
+ /* @__PURE__ */ jsx43(Box34, { borderStyle: "single", borderColor: theme.border.focused, paddingX: 1, children: /* @__PURE__ */ jsx43(Text42, { color: theme.text.accent, children: apiKeyInput.length > 0 ? maskApiKeyInput(apiKeyInput.length) : /* @__PURE__ */ jsx43(Text42, { color: theme.ui.comment, dimColor: true, children: "paste or type\u2026" }) }) })
27956
28107
  ] })
27957
28108
  ] }),
27958
- status && /* @__PURE__ */ jsx43(Box34, { marginTop: 1, children: /* @__PURE__ */ jsx43(Text41, { color: statusColor2, children: status.text }) }),
27959
- phase === "actions" && testLatencyMs !== void 0 && /* @__PURE__ */ jsxs38(Box34, { marginTop: 0, gap: 1, children: [
27960
- /* @__PURE__ */ jsxs38(Text41, { color: getLatencyColor(testLatencyMs), bold: true, children: [
28109
+ status && /* @__PURE__ */ jsx43(Box34, { marginTop: 1, children: /* @__PURE__ */ jsx43(Text42, { color: statusColor3, children: status.text }) }),
28110
+ phase === "actions" && testLatencyMs !== void 0 && /* @__PURE__ */ jsxs39(Box34, { marginTop: 0, gap: 1, children: [
28111
+ /* @__PURE__ */ jsxs39(Text42, { color: getLatencyColor(testLatencyMs), bold: true, children: [
27961
28112
  testLatencyMs,
27962
28113
  "ms"
27963
28114
  ] }),
27964
- /* @__PURE__ */ jsx43(Text41, { color: theme.text.secondary, children: testLatencyMs < 300 ? "excellent" : testLatencyMs < 800 ? "good" : "slow" })
28115
+ /* @__PURE__ */ jsx43(Text42, { color: theme.text.secondary, children: testLatencyMs < 300 ? "excellent" : testLatencyMs < 800 ? "good" : "slow" })
27965
28116
  ] }),
27966
28117
  /* @__PURE__ */ jsx43(
27967
28118
  Box34,
@@ -27973,7 +28124,7 @@ var ProviderDialog = ({
27973
28124
  borderLeft: false,
27974
28125
  borderRight: false,
27975
28126
  borderColor: theme.ui.comment,
27976
- children: /* @__PURE__ */ jsxs38(Text41, { color: theme.ui.comment, dimColor: true, children: [
28127
+ children: /* @__PURE__ */ jsxs39(Text42, { color: theme.ui.comment, dimColor: true, children: [
27977
28128
  footer,
27978
28129
  phase === "actions" && " Test does not change the session."
27979
28130
  ] })
@@ -28041,7 +28192,7 @@ var PermissionsDialog = ({
28041
28192
  [onClose]
28042
28193
  );
28043
28194
  useKeypress(handleEscape, { isActive: true });
28044
- return /* @__PURE__ */ jsxs39(
28195
+ return /* @__PURE__ */ jsxs40(
28045
28196
  Box35,
28046
28197
  {
28047
28198
  flexDirection: "column",
@@ -28051,9 +28202,9 @@ var PermissionsDialog = ({
28051
28202
  marginLeft: 2,
28052
28203
  marginRight: 2,
28053
28204
  children: [
28054
- /* @__PURE__ */ jsx44(Text42, { bold: true, color: theme.text.accent, children: "Permission policy" }),
28205
+ /* @__PURE__ */ jsx44(Text43, { bold: true, color: theme.text.accent, children: "Permission policy" }),
28055
28206
  /* @__PURE__ */ jsx44(RadioButtonSelect, { items, onSelect: handleSelect, isFocused: true, showNumbers: false }),
28056
- /* @__PURE__ */ jsx44(Text42, { color: theme.text.secondary, children: "\u2191\u2193 navigate \xB7 Enter cycles allow/ask/deny \xB7 Esc cancel" })
28207
+ /* @__PURE__ */ jsx44(Text43, { color: theme.text.secondary, children: "\u2191\u2193 navigate \xB7 Enter cycles allow/ask/deny \xB7 Esc cancel" })
28057
28208
  ]
28058
28209
  }
28059
28210
  );
@@ -28161,7 +28312,7 @@ var AuthDialog = ({
28161
28312
  [onClose, phase]
28162
28313
  );
28163
28314
  useKeypress(handleEscape, { isActive: true });
28164
- return /* @__PURE__ */ jsxs40(
28315
+ return /* @__PURE__ */ jsxs41(
28165
28316
  Box36,
28166
28317
  {
28167
28318
  flexDirection: "column",
@@ -28171,32 +28322,32 @@ var AuthDialog = ({
28171
28322
  marginLeft: 2,
28172
28323
  marginRight: 2,
28173
28324
  children: [
28174
- /* @__PURE__ */ jsx45(Text43, { bold: true, color: theme.text.accent, children: "GitHub authentication" }),
28175
- /* @__PURE__ */ jsx45(Text43, { color: theme.text.secondary, children: statusSummary }),
28325
+ /* @__PURE__ */ jsx45(Text44, { bold: true, color: theme.text.accent, children: "GitHub authentication" }),
28326
+ /* @__PURE__ */ jsx45(Text44, { color: theme.text.secondary, children: statusSummary }),
28176
28327
  phase === "menu" && /* @__PURE__ */ jsx45(RadioButtonSelect, { items, onSelect: handleSelect, isFocused: true, showNumbers: false }),
28177
- deviceCode && phase === "running" && /* @__PURE__ */ jsxs40(Box36, { flexDirection: "column", marginTop: 1, children: [
28178
- /* @__PURE__ */ jsxs40(Text43, { children: [
28328
+ deviceCode && phase === "running" && /* @__PURE__ */ jsxs41(Box36, { flexDirection: "column", marginTop: 1, children: [
28329
+ /* @__PURE__ */ jsxs41(Text44, { children: [
28179
28330
  "Open: ",
28180
- /* @__PURE__ */ jsx45(Text43, { color: theme.text.accent, children: deviceCode.verificationUri })
28331
+ /* @__PURE__ */ jsx45(Text44, { color: theme.text.accent, children: deviceCode.verificationUri })
28181
28332
  ] }),
28182
- /* @__PURE__ */ jsxs40(Text43, { children: [
28333
+ /* @__PURE__ */ jsxs41(Text44, { children: [
28183
28334
  "Code: ",
28184
- /* @__PURE__ */ jsx45(Text43, { bold: true, color: theme.text.accent, children: deviceCode.userCode })
28335
+ /* @__PURE__ */ jsx45(Text44, { bold: true, color: theme.text.accent, children: deviceCode.userCode })
28185
28336
  ] }),
28186
- /* @__PURE__ */ jsxs40(Text43, { color: theme.text.secondary, children: [
28337
+ /* @__PURE__ */ jsxs41(Text44, { color: theme.text.secondary, children: [
28187
28338
  "Expires in ",
28188
28339
  Math.round(deviceCode.expiresIn / 60),
28189
28340
  " minutes."
28190
28341
  ] })
28191
28342
  ] }),
28192
28343
  message && /* @__PURE__ */ jsx45(
28193
- Text43,
28344
+ Text44,
28194
28345
  {
28195
28346
  color: phase === "error" ? theme.status.error : phase === "done" ? theme.status.success : theme.text.secondary,
28196
28347
  children: message
28197
28348
  }
28198
28349
  ),
28199
- /* @__PURE__ */ jsx45(Text43, { color: theme.text.secondary, children: phase === "running" ? "Esc cancel login" : phase === "menu" ? "\u2191\u2193 navigate \xB7 Enter select \xB7 Esc close" : "Esc close" })
28350
+ /* @__PURE__ */ jsx45(Text44, { color: theme.text.secondary, children: phase === "running" ? "Esc cancel login" : phase === "menu" ? "\u2191\u2193 navigate \xB7 Enter select \xB7 Esc close" : "Esc close" })
28200
28351
  ]
28201
28352
  }
28202
28353
  );
@@ -28323,7 +28474,7 @@ var ModelDialog = ({
28323
28474
  }, { isActive: true });
28324
28475
  const canScrollUp = scrollTop > 0;
28325
28476
  const canScrollDown = scrollTop + MAX_VISIBLE < rows.length;
28326
- return /* @__PURE__ */ jsxs41(
28477
+ return /* @__PURE__ */ jsxs42(
28327
28478
  Box37,
28328
28479
  {
28329
28480
  flexDirection: "column",
@@ -28335,15 +28486,15 @@ var ModelDialog = ({
28335
28486
  marginRight: 1,
28336
28487
  minWidth: 58,
28337
28488
  children: [
28338
- /* @__PURE__ */ jsxs41(Box37, { justifyContent: "space-between", marginBottom: 1, children: [
28339
- /* @__PURE__ */ jsxs41(Box37, { gap: 1, children: [
28340
- /* @__PURE__ */ jsx46(Text44, { bold: true, color: theme.text.primary, children: "Select model" }),
28341
- /* @__PURE__ */ jsx46(Text44, { color: theme.text.secondary, children: "for" }),
28342
- /* @__PURE__ */ jsx46(Text44, { color: theme.text.accent, children: currentProvider })
28489
+ /* @__PURE__ */ jsxs42(Box37, { justifyContent: "space-between", marginBottom: 1, children: [
28490
+ /* @__PURE__ */ jsxs42(Box37, { gap: 1, children: [
28491
+ /* @__PURE__ */ jsx46(Text45, { bold: true, color: theme.text.primary, children: "Select model" }),
28492
+ /* @__PURE__ */ jsx46(Text45, { color: theme.text.secondary, children: "for" }),
28493
+ /* @__PURE__ */ jsx46(Text45, { color: theme.text.accent, children: currentProvider })
28343
28494
  ] }),
28344
- /* @__PURE__ */ jsx46(Text44, { color: theme.ui.comment, dimColor: true, children: "esc" })
28495
+ /* @__PURE__ */ jsx46(Text45, { color: theme.ui.comment, dimColor: true, children: "esc" })
28345
28496
  ] }),
28346
- /* @__PURE__ */ jsxs41(
28497
+ /* @__PURE__ */ jsxs42(
28347
28498
  Box37,
28348
28499
  {
28349
28500
  borderStyle: "single",
@@ -28351,57 +28502,57 @@ var ModelDialog = ({
28351
28502
  paddingX: 1,
28352
28503
  marginBottom: 1,
28353
28504
  children: [
28354
- /* @__PURE__ */ jsx46(Text44, { color: theme.ui.comment, children: "\u2315 " }),
28355
- search ? /* @__PURE__ */ jsxs41(Text44, { color: theme.text.primary, children: [
28505
+ /* @__PURE__ */ jsx46(Text45, { color: theme.ui.comment, children: "\u2315 " }),
28506
+ search ? /* @__PURE__ */ jsxs42(Text45, { color: theme.text.primary, children: [
28356
28507
  search,
28357
- /* @__PURE__ */ jsx46(Text44, { color: theme.text.accent, children: "\u258C" })
28358
- ] }) : /* @__PURE__ */ jsxs41(Text44, { color: theme.ui.comment, dimColor: true, children: [
28508
+ /* @__PURE__ */ jsx46(Text45, { color: theme.text.accent, children: "\u258C" })
28509
+ ] }) : /* @__PURE__ */ jsxs42(Text45, { color: theme.ui.comment, dimColor: true, children: [
28359
28510
  "Search",
28360
- /* @__PURE__ */ jsx46(Text44, { color: theme.text.accent, children: "\u258C" })
28511
+ /* @__PURE__ */ jsx46(Text45, { color: theme.text.accent, children: "\u258C" })
28361
28512
  ] })
28362
28513
  ]
28363
28514
  }
28364
28515
  ),
28365
- loadState === "loading" && /* @__PURE__ */ jsx46(Box37, { marginY: 1, children: /* @__PURE__ */ jsx46(Text44, { color: theme.text.secondary, children: "Loading models\u2026" }) }),
28366
- loadState === "error" && /* @__PURE__ */ jsxs41(Box37, { flexDirection: "column", marginY: 1, children: [
28367
- /* @__PURE__ */ jsx46(Text44, { color: theme.status.error, children: "\u2717 Could not load models" }),
28368
- /* @__PURE__ */ jsx46(Text44, { color: theme.ui.comment, dimColor: true, children: errorMsg })
28516
+ loadState === "loading" && /* @__PURE__ */ jsx46(Box37, { marginY: 1, children: /* @__PURE__ */ jsx46(Text45, { color: theme.text.secondary, children: "Loading models\u2026" }) }),
28517
+ loadState === "error" && /* @__PURE__ */ jsxs42(Box37, { flexDirection: "column", marginY: 1, children: [
28518
+ /* @__PURE__ */ jsx46(Text45, { color: theme.status.error, children: "\u2717 Could not load models" }),
28519
+ /* @__PURE__ */ jsx46(Text45, { color: theme.ui.comment, dimColor: true, children: errorMsg })
28369
28520
  ] }),
28370
- loadState === "ready" && selectableCount === 0 && /* @__PURE__ */ jsx46(Box37, { marginY: 1, children: /* @__PURE__ */ jsxs41(Text44, { color: theme.ui.comment, dimColor: true, children: [
28521
+ loadState === "ready" && selectableCount === 0 && /* @__PURE__ */ jsx46(Box37, { marginY: 1, children: /* @__PURE__ */ jsxs42(Text45, { color: theme.ui.comment, dimColor: true, children: [
28371
28522
  'No models match "',
28372
28523
  search,
28373
28524
  '"'
28374
28525
  ] }) }),
28375
- loadState === "ready" && selectableCount > 0 && /* @__PURE__ */ jsxs41(Box37, { flexDirection: "column", children: [
28376
- canScrollUp && /* @__PURE__ */ jsx46(Text44, { color: theme.ui.comment, dimColor: true, children: " \u2191" }),
28526
+ loadState === "ready" && selectableCount > 0 && /* @__PURE__ */ jsxs42(Box37, { flexDirection: "column", children: [
28527
+ canScrollUp && /* @__PURE__ */ jsx46(Text45, { color: theme.ui.comment, dimColor: true, children: " \u2191" }),
28377
28528
  visibleRows.map((row, i) => {
28378
28529
  if (row.kind === "header") {
28379
- return /* @__PURE__ */ jsx46(Box37, { marginTop: i === 0 ? 0 : 1, children: /* @__PURE__ */ jsx46(Text44, { color: theme.text.accent, bold: true, children: row.label }) }, `h${i}`);
28530
+ return /* @__PURE__ */ jsx46(Box37, { marginTop: i === 0 ? 0 : 1, children: /* @__PURE__ */ jsx46(Text45, { color: theme.text.accent, bold: true, children: row.label }) }, `h${i}`);
28380
28531
  }
28381
28532
  const { model, selIndex } = row;
28382
28533
  const isActive = selIndex === clampedIndex;
28383
28534
  const isCurrent = model.id === currentModel;
28384
28535
  const free = isFree(model);
28385
28536
  const group = providerGroup(model);
28386
- return /* @__PURE__ */ jsxs41(Box37, { gap: 1, children: [
28387
- /* @__PURE__ */ jsx46(Text44, { color: isActive ? theme.text.accent : theme.ui.comment, children: isCurrent ? "\u25CF" : isActive ? "\u203A" : " " }),
28388
- /* @__PURE__ */ jsxs41(Box37, { flexGrow: 1, gap: 1, children: [
28537
+ return /* @__PURE__ */ jsxs42(Box37, { gap: 1, children: [
28538
+ /* @__PURE__ */ jsx46(Text45, { color: isActive ? theme.text.accent : theme.ui.comment, children: isCurrent ? "\u25CF" : isActive ? "\u203A" : " " }),
28539
+ /* @__PURE__ */ jsxs42(Box37, { flexGrow: 1, gap: 1, children: [
28389
28540
  /* @__PURE__ */ jsx46(
28390
- Text44,
28541
+ Text45,
28391
28542
  {
28392
28543
  color: isActive ? theme.text.primary : theme.text.secondary,
28393
28544
  bold: isActive,
28394
28545
  children: model.name
28395
28546
  }
28396
28547
  ),
28397
- /* @__PURE__ */ jsx46(Text44, { color: theme.text.accent, dimColor: true, children: group })
28548
+ /* @__PURE__ */ jsx46(Text45, { color: theme.text.accent, dimColor: true, children: group })
28398
28549
  ] }),
28399
- free && /* @__PURE__ */ jsx46(Text44, { color: theme.status.success, dimColor: !isActive, children: "Free" })
28550
+ free && /* @__PURE__ */ jsx46(Text45, { color: theme.status.success, dimColor: !isActive, children: "Free" })
28400
28551
  ] }, model.id);
28401
28552
  }),
28402
- canScrollDown && /* @__PURE__ */ jsx46(Text44, { color: theme.ui.comment, dimColor: true, children: " \u2193" })
28553
+ canScrollDown && /* @__PURE__ */ jsx46(Text45, { color: theme.ui.comment, dimColor: true, children: " \u2193" })
28403
28554
  ] }),
28404
- loadState === "ready" && /* @__PURE__ */ jsx46(Box37, { marginTop: 1, children: /* @__PURE__ */ jsxs41(Text44, { color: theme.ui.comment, dimColor: true, children: [
28555
+ loadState === "ready" && /* @__PURE__ */ jsx46(Box37, { marginTop: 1, children: /* @__PURE__ */ jsxs42(Text45, { color: theme.ui.comment, dimColor: true, children: [
28405
28556
  selectableCount,
28406
28557
  " model",
28407
28558
  selectableCount !== 1 ? "s" : "",
@@ -28417,13 +28568,61 @@ var ModelDialog = ({
28417
28568
  borderLeft: false,
28418
28569
  borderRight: false,
28419
28570
  borderColor: theme.ui.comment,
28420
- children: /* @__PURE__ */ jsx46(Text44, { color: theme.ui.comment, dimColor: true, children: "\u2191\u2193 navigate type to search Enter use for session Esc close" })
28571
+ children: /* @__PURE__ */ jsx46(Text45, { color: theme.ui.comment, dimColor: true, children: "\u2191\u2193 navigate type to search Enter use for session Esc close" })
28421
28572
  }
28422
28573
  )
28423
28574
  ]
28424
28575
  }
28425
28576
  );
28426
28577
  };
28578
+ function statusIcon(entry) {
28579
+ if (entry.status === "done") return "\u2713";
28580
+ if (entry.status === "failed") return "\u2717";
28581
+ return "\u2026";
28582
+ }
28583
+ function statusColor2(entry) {
28584
+ if (entry.status === "done") return theme.status.success;
28585
+ if (entry.status === "failed") return theme.status.error;
28586
+ return theme.text.accent;
28587
+ }
28588
+ var SubagentsPanel = ({ subagents, mainAreaWidth }) => {
28589
+ if (subagents.length === 0) return null;
28590
+ const running = subagents.filter((s) => s.status === "running").length;
28591
+ const title = running > 0 ? `Subagents (${running} running)` : `Subagents (${subagents.length} finishing\u2026)`;
28592
+ return /* @__PURE__ */ jsxs43(
28593
+ Box38,
28594
+ {
28595
+ flexDirection: "column",
28596
+ borderStyle: "round",
28597
+ borderColor: theme.text.accent,
28598
+ marginLeft: 2,
28599
+ marginRight: 2,
28600
+ marginTop: 1,
28601
+ width: Math.min(mainAreaWidth, 80),
28602
+ children: [
28603
+ /* @__PURE__ */ jsx47(Box38, { paddingX: 1, children: /* @__PURE__ */ jsx47(Text46, { bold: true, color: theme.text.accent, children: title }) }),
28604
+ subagents.map((entry) => /* @__PURE__ */ jsxs43(Box38, { flexDirection: "row", paddingX: 1, gap: 1, children: [
28605
+ /* @__PURE__ */ jsx47(Text46, { color: statusColor2(entry), children: statusIcon(entry) }),
28606
+ /* @__PURE__ */ jsxs43(Box38, { flexDirection: "column", flexShrink: 1, children: [
28607
+ /* @__PURE__ */ jsxs43(Text46, { wrap: "truncate", color: theme.text.primary, children: [
28608
+ entry.prompt,
28609
+ entry.prompt.length >= 50 ? "\u2026" : ""
28610
+ ] }),
28611
+ entry.status === "running" && entry.currentTool && /* @__PURE__ */ jsxs43(Text46, { color: theme.text.secondary, dimColor: true, children: [
28612
+ " ",
28613
+ "using ",
28614
+ entry.currentTool
28615
+ ] }),
28616
+ entry.status === "failed" && entry.error && /* @__PURE__ */ jsxs43(Text46, { color: theme.status.error, dimColor: true, children: [
28617
+ " ",
28618
+ entry.error.slice(0, 60)
28619
+ ] })
28620
+ ] })
28621
+ ] }, entry.taskId))
28622
+ ]
28623
+ }
28624
+ );
28625
+ };
28427
28626
  function safeStringify(value, maxLength = 220) {
28428
28627
  try {
28429
28628
  const serialized = JSON.stringify(value);
@@ -28599,6 +28798,7 @@ var AppContainer = ({ cwd, config, provider, model }) => {
28599
28798
  const [, setThemeVersion] = useState26(0);
28600
28799
  const [mcpConnected, setMcpConnected] = useState26(0);
28601
28800
  const [mcpTotal, setMcpTotal] = useState26(0);
28801
+ const [subagentMap, setSubagentMap] = useState26(/* @__PURE__ */ new Map());
28602
28802
  const [, setDrainTick] = useState26(0);
28603
28803
  const [pendingCommandConfirmation, setPendingCommandConfirmation] = useState26(null);
28604
28804
  const runtimeRef = useRef16(null);
@@ -28902,6 +29102,49 @@ var AppContainer = ({ cwd, config, provider, model }) => {
28902
29102
  setLiveToolCalls((prev) => reduceToolActivity(prev, activity));
28903
29103
  })
28904
29104
  );
29105
+ unsubscribers.push(
29106
+ runtime.events.on("subagent:start", ({ taskId, prompt }) => {
29107
+ setSubagentMap((prev) => {
29108
+ const next = new Map(prev);
29109
+ next.set(taskId, {
29110
+ taskId,
29111
+ prompt: prompt.slice(0, 50),
29112
+ status: "running",
29113
+ startedAt: Date.now()
29114
+ });
29115
+ return next;
29116
+ });
29117
+ })
29118
+ );
29119
+ unsubscribers.push(
29120
+ runtime.events.on("subagent:tool", ({ taskId, toolName, active }) => {
29121
+ setSubagentMap((prev) => {
29122
+ const entry = prev.get(taskId);
29123
+ if (!entry) return prev;
29124
+ const next = new Map(prev);
29125
+ next.set(taskId, { ...entry, currentTool: active ? toolName : void 0 });
29126
+ return next;
29127
+ });
29128
+ })
29129
+ );
29130
+ unsubscribers.push(
29131
+ runtime.events.on("subagent:complete", ({ taskId, error }) => {
29132
+ setSubagentMap((prev) => {
29133
+ const entry = prev.get(taskId);
29134
+ if (!entry) return prev;
29135
+ const next = new Map(prev);
29136
+ next.set(taskId, { ...entry, status: error ? "failed" : "done", currentTool: void 0, error });
29137
+ setTimeout(() => {
29138
+ setSubagentMap((m) => {
29139
+ const updated = new Map(m);
29140
+ updated.delete(taskId);
29141
+ return updated;
29142
+ });
29143
+ }, 3e3);
29144
+ return next;
29145
+ });
29146
+ })
29147
+ );
28905
29148
  unsubscribeRef.current = unsubscribers;
28906
29149
  setIsInitializing(false);
28907
29150
  addHistoryItem(
@@ -29684,6 +29927,7 @@ var AppContainer = ({ cwd, config, provider, model }) => {
29684
29927
  themeName
29685
29928
  ]
29686
29929
  );
29930
+ const activeSubagents = useMemo15(() => Array.from(subagentMap.values()), [subagentMap]);
29687
29931
  const uiState = useMemo15(
29688
29932
  () => ({
29689
29933
  history: historyManager.history,
@@ -29740,10 +29984,12 @@ var AppContainer = ({ cwd, config, provider, model }) => {
29740
29984
  isFeedbackDialogOpen,
29741
29985
  showAutoAcceptIndicator: "default",
29742
29986
  mcpConnected,
29743
- mcpTotal
29987
+ mcpTotal,
29988
+ activeSubagents
29744
29989
  }),
29745
29990
  [
29746
29991
  approvalQueue.length,
29992
+ subagentMap,
29747
29993
  activeDialog,
29748
29994
  buffer,
29749
29995
  commandContext,
@@ -29779,37 +30025,37 @@ var AppContainer = ({ cwd, config, provider, model }) => {
29779
30025
  userMessages
29780
30026
  ]
29781
30027
  );
29782
- return /* @__PURE__ */ jsx47(CompactModeProvider, { value: { compactMode }, children: /* @__PURE__ */ jsx47(ConfigContext.Provider, { value: configAdapter, children: /* @__PURE__ */ jsx47(SettingsContext.Provider, { value: loadedSettings, children: /* @__PURE__ */ jsx47(StreamingContext.Provider, { value: streamingState, children: /* @__PURE__ */ jsx47(VimModeProvider, { initialVimEnabled: loadedSettings.merged.general?.vimMode ?? false, children: /* @__PURE__ */ jsx47(KeypressProvider, { kittyProtocolEnabled: false, config: configAdapter, children: /* @__PURE__ */ jsx47(ShellFocusContext.Provider, { value: true, children: /* @__PURE__ */ jsx47(AgentViewProvider, { children: /* @__PURE__ */ jsx47(BackgroundTaskViewProvider, { children: /* @__PURE__ */ jsx47(UIStateContext.Provider, { value: uiState, children: /* @__PURE__ */ jsx47(UIActionsContext.Provider, { value: uiActions, children: /* @__PURE__ */ jsxs42(Box38, { flexDirection: "column", flexGrow: 1, children: [
29783
- /* @__PURE__ */ jsxs42(Box38, { marginLeft: 2, marginRight: 2, marginTop: 1, marginBottom: 1, children: [
29784
- /* @__PURE__ */ jsx47(Text45, { bold: true, color: theme.text.accent, children: "DeepCode" }),
29785
- /* @__PURE__ */ jsx47(Text45, { color: theme.text.secondary, children: " Target: " }),
29786
- /* @__PURE__ */ jsx47(Text45, { color: theme.text.primary, children: providerLabel }),
29787
- /* @__PURE__ */ jsxs42(Text45, { color: theme.text.secondary, children: [
30028
+ return /* @__PURE__ */ jsx48(CompactModeProvider, { value: { compactMode }, children: /* @__PURE__ */ jsx48(ConfigContext.Provider, { value: configAdapter, children: /* @__PURE__ */ jsx48(SettingsContext.Provider, { value: loadedSettings, children: /* @__PURE__ */ jsx48(StreamingContext.Provider, { value: streamingState, children: /* @__PURE__ */ jsx48(VimModeProvider, { initialVimEnabled: loadedSettings.merged.general?.vimMode ?? false, children: /* @__PURE__ */ jsx48(KeypressProvider, { kittyProtocolEnabled: false, config: configAdapter, children: /* @__PURE__ */ jsx48(ShellFocusContext.Provider, { value: true, children: /* @__PURE__ */ jsx48(AgentViewProvider, { children: /* @__PURE__ */ jsx48(BackgroundTaskViewProvider, { children: /* @__PURE__ */ jsx48(UIStateContext.Provider, { value: uiState, children: /* @__PURE__ */ jsx48(UIActionsContext.Provider, { value: uiActions, children: /* @__PURE__ */ jsxs44(Box39, { flexDirection: "column", flexGrow: 1, children: [
30029
+ /* @__PURE__ */ jsxs44(Box39, { marginLeft: 2, marginRight: 2, marginTop: 1, marginBottom: 1, children: [
30030
+ /* @__PURE__ */ jsx48(Text47, { bold: true, color: theme.text.accent, children: "DeepCode" }),
30031
+ /* @__PURE__ */ jsx48(Text47, { color: theme.text.secondary, children: " Target: " }),
30032
+ /* @__PURE__ */ jsx48(Text47, { color: theme.text.primary, children: providerLabel }),
30033
+ /* @__PURE__ */ jsxs44(Text47, { color: theme.text.secondary, children: [
29788
30034
  " (",
29789
30035
  targetSource,
29790
30036
  ")"
29791
30037
  ] }),
29792
- /* @__PURE__ */ jsx47(Text45, { color: theme.text.secondary, children: " Mode: " }),
29793
- /* @__PURE__ */ jsx47(
29794
- Text45,
30038
+ /* @__PURE__ */ jsx48(Text47, { color: theme.text.secondary, children: " Mode: " }),
30039
+ /* @__PURE__ */ jsx48(
30040
+ Text47,
29795
30041
  {
29796
30042
  bold: true,
29797
30043
  color: agentMode === "build" ? theme.status.success : theme.status.warning,
29798
30044
  children: agentMode.toUpperCase()
29799
30045
  }
29800
30046
  ),
29801
- /* @__PURE__ */ jsxs42(Text45, { color: theme.text.secondary, children: [
30047
+ /* @__PURE__ */ jsxs44(Text47, { color: theme.text.secondary, children: [
29802
30048
  " ",
29803
30049
  streamingState === "responding" ? "running" : streamingState === "waiting_for_confirmation" ? "waiting-approval" : "idle"
29804
30050
  ] }),
29805
- iterationInfo && /* @__PURE__ */ jsxs42(Text45, { color: theme.text.secondary, children: [
30051
+ iterationInfo && /* @__PURE__ */ jsxs44(Text47, { color: theme.text.secondary, children: [
29806
30052
  " ",
29807
30053
  "iter ",
29808
30054
  iterationInfo.round,
29809
30055
  "/",
29810
30056
  iterationInfo.max
29811
30057
  ] }),
29812
- lastPromptTokenCount > 0 && /* @__PURE__ */ jsxs42(Text45, { color: theme.text.secondary, children: [
30058
+ lastPromptTokenCount > 0 && /* @__PURE__ */ jsxs44(Text47, { color: theme.text.secondary, children: [
29813
30059
  " ",
29814
30060
  "\u2191",
29815
30061
  formatTokenCount(lastPromptTokenCount),
@@ -29817,10 +30063,10 @@ var AppContainer = ({ cwd, config, provider, model }) => {
29817
30063
  formatTokenCount(lastOutputTokenCount)
29818
30064
  ] })
29819
30065
  ] }),
29820
- initError ? /* @__PURE__ */ jsx47(Box38, { marginLeft: 2, marginRight: 2, children: /* @__PURE__ */ jsxs42(Text45, { color: theme.status.error, children: [
30066
+ initError ? /* @__PURE__ */ jsx48(Box39, { marginLeft: 2, marginRight: 2, children: /* @__PURE__ */ jsxs44(Text47, { color: theme.status.error, children: [
29821
30067
  "Failed to initialize runtime: ",
29822
30068
  initError
29823
- ] }) }) : /* @__PURE__ */ jsx47(
30069
+ ] }) }) : /* @__PURE__ */ jsx48(
29824
30070
  MainContent,
29825
30071
  {
29826
30072
  history: historyManager.history,
@@ -29834,9 +30080,9 @@ var AppContainer = ({ cwd, config, provider, model }) => {
29834
30080
  },
29835
30081
  historyRemountKey
29836
30082
  ),
29837
- approvalQueue.length > 0 && /* @__PURE__ */ jsx47(Box38, { marginLeft: 2, marginRight: 2, marginTop: 1, children: /* @__PURE__ */ jsx47(ApprovalPrompt, { request: approvalQueue[0] }) }),
29838
- dialogModel && /* @__PURE__ */ jsx47(CommandDialog, { title: dialogModel.title, lines: dialogModel.lines }),
29839
- activeDialog === "provider" && /* @__PURE__ */ jsx47(
30083
+ approvalQueue.length > 0 && /* @__PURE__ */ jsx48(Box39, { marginLeft: 2, marginRight: 2, marginTop: 1, children: /* @__PURE__ */ jsx48(ApprovalPrompt, { request: approvalQueue[0] }) }),
30084
+ dialogModel && /* @__PURE__ */ jsx48(CommandDialog, { title: dialogModel.title, lines: dialogModel.lines }),
30085
+ activeDialog === "provider" && /* @__PURE__ */ jsx48(
29840
30086
  ProviderDialog,
29841
30087
  {
29842
30088
  providers: listAvailableProviders(),
@@ -29851,7 +30097,7 @@ var AppContainer = ({ cwd, config, provider, model }) => {
29851
30097
  onClose: closeDialog
29852
30098
  }
29853
30099
  ),
29854
- activeDialog === "model" && /* @__PURE__ */ jsx47(
30100
+ activeDialog === "model" && /* @__PURE__ */ jsx48(
29855
30101
  ModelDialog,
29856
30102
  {
29857
30103
  currentProvider: getSessionCommandState().provider,
@@ -29861,7 +30107,7 @@ var AppContainer = ({ cwd, config, provider, model }) => {
29861
30107
  onClose: closeDialog
29862
30108
  }
29863
30109
  ),
29864
- activeDialog === "theme" && /* @__PURE__ */ jsx47(
30110
+ activeDialog === "theme" && /* @__PURE__ */ jsx48(
29865
30111
  ThemeDialog,
29866
30112
  {
29867
30113
  onSelect: handleSelectTheme,
@@ -29869,7 +30115,7 @@ var AppContainer = ({ cwd, config, provider, model }) => {
29869
30115
  onPreview: previewTheme
29870
30116
  }
29871
30117
  ),
29872
- activeDialog === "permissions" && /* @__PURE__ */ jsx47(
30118
+ activeDialog === "permissions" && /* @__PURE__ */ jsx48(
29873
30119
  PermissionsDialog,
29874
30120
  {
29875
30121
  current: permissionModes,
@@ -29877,7 +30123,7 @@ var AppContainer = ({ cwd, config, provider, model }) => {
29877
30123
  onClose: closeDialog
29878
30124
  }
29879
30125
  ),
29880
- activeDialog === "auth" && runtimeRef.current && /* @__PURE__ */ jsx47(
30126
+ activeDialog === "auth" && runtimeRef.current && /* @__PURE__ */ jsx48(
29881
30127
  AuthDialog,
29882
30128
  {
29883
30129
  clientId: runtimeRef.current.config.github.oauthClientId,
@@ -29890,7 +30136,7 @@ var AppContainer = ({ cwd, config, provider, model }) => {
29890
30136
  onClose: closeDialog
29891
30137
  }
29892
30138
  ),
29893
- pendingCommandConfirmation && /* @__PURE__ */ jsx47(
30139
+ pendingCommandConfirmation && /* @__PURE__ */ jsx48(
29894
30140
  CommandDialog,
29895
30141
  {
29896
30142
  title: "Confirm action",
@@ -29902,7 +30148,14 @@ var AppContainer = ({ cwd, config, provider, model }) => {
29902
30148
  footerText: "Press y or Enter to confirm. Press n or Esc to cancel."
29903
30149
  }
29904
30150
  ),
29905
- /* @__PURE__ */ jsx47(Composer, {})
30151
+ /* @__PURE__ */ jsx48(
30152
+ SubagentsPanel,
30153
+ {
30154
+ subagents: Array.from(subagentMap.values()),
30155
+ mainAreaWidth
30156
+ }
30157
+ ),
30158
+ /* @__PURE__ */ jsx48(Composer, {})
29906
30159
  ] }) }) }) }) }) }) }) }) }) }) }) });
29907
30160
  };
29908
30161
  function formatProviderLabel(provider, model) {
@@ -30004,22 +30257,22 @@ function formatAuthSummary(config) {
30004
30257
  var ApprovalPrompt = ({ request }) => {
30005
30258
  if (!request) return null;
30006
30259
  const operationLabel = formatApprovalOperationLabel(request);
30007
- return /* @__PURE__ */ jsxs42(Box38, { flexDirection: "column", marginTop: 1, children: [
30008
- /* @__PURE__ */ jsxs42(Text45, { color: theme.status.warning, children: [
30260
+ return /* @__PURE__ */ jsxs44(Box39, { flexDirection: "column", marginTop: 1, children: [
30261
+ /* @__PURE__ */ jsxs44(Text47, { color: theme.status.warning, children: [
30009
30262
  "\u26A0 Allow ",
30010
30263
  operationLabel,
30011
30264
  "?"
30012
30265
  ] }),
30013
- request.path && /* @__PURE__ */ jsxs42(Text45, { color: theme.text.secondary, children: [
30266
+ request.path && /* @__PURE__ */ jsxs44(Text47, { color: theme.text.secondary, children: [
30014
30267
  " ",
30015
30268
  request.path
30016
30269
  ] }),
30017
- request.preview?.command && /* @__PURE__ */ jsxs42(Text45, { color: theme.text.secondary, children: [
30270
+ request.preview?.command && /* @__PURE__ */ jsxs44(Text47, { color: theme.text.secondary, children: [
30018
30271
  " $ ",
30019
30272
  request.preview.command,
30020
30273
  request.preview.args?.length ? ` ${request.preview.args.join(" ")}` : ""
30021
30274
  ] }),
30022
- /* @__PURE__ */ jsx47(Text45, { color: theme.text.secondary, children: " [\u21B5/y] once [s] session [a] always [n] deny" })
30275
+ /* @__PURE__ */ jsx48(Text47, { color: theme.text.secondary, children: " [\u21B5/y] once [s] session [a] always [n] deny" })
30023
30276
  ] });
30024
30277
  };
30025
30278
  function formatApprovalOperationLabel(request) {
@@ -30080,7 +30333,7 @@ var DeepCodeConfigAdapter = class {
30080
30333
  }
30081
30334
  };
30082
30335
  function App(props) {
30083
- return /* @__PURE__ */ jsx48(
30336
+ return /* @__PURE__ */ jsx49(
30084
30337
  AppContainer,
30085
30338
  {
30086
30339
  cwd: props.cwd,