@proxysoul/soulforge 2.12.0 → 2.12.2

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
@@ -41471,7 +41471,7 @@ var package_default;
41471
41471
  var init_package = __esm(() => {
41472
41472
  package_default = {
41473
41473
  name: "@proxysoul/soulforge",
41474
- version: "2.12.0",
41474
+ version: "2.12.2",
41475
41475
  description: "Graph-powered code intelligence \u2014 multi-agent coding with codebase-aware AI",
41476
41476
  repository: {
41477
41477
  type: "git",
@@ -41624,19 +41624,19 @@ function getUpgradeCommand(method) {
41624
41624
  const m = method ?? detectInstallMethod();
41625
41625
  switch (m) {
41626
41626
  case "npm":
41627
- return `npm update -g ${PKG_NAME}`;
41627
+ return `npm install -g ${PKG_NAME}@latest`;
41628
41628
  case "pnpm":
41629
- return `pnpm update -g ${PKG_NAME}`;
41629
+ return `pnpm add -g ${PKG_NAME}@latest`;
41630
41630
  case "yarn":
41631
- return `yarn global upgrade ${PKG_NAME}`;
41631
+ return `yarn global add ${PKG_NAME}@latest`;
41632
41632
  case "bun":
41633
- return `bun update -g ${PKG_NAME}`;
41633
+ return `bun install -g ${PKG_NAME}@latest`;
41634
41634
  case "brew":
41635
41635
  return "brew update && brew upgrade soulforge";
41636
41636
  case "binary":
41637
41637
  return "Download the latest release from GitHub";
41638
41638
  default:
41639
- return `npm update -g ${PKG_NAME}`;
41639
+ return `npm install -g ${PKG_NAME}@latest`;
41640
41640
  }
41641
41641
  }
41642
41642
  function getUpgradeArgs(method) {
@@ -41645,22 +41645,22 @@ function getUpgradeArgs(method) {
41645
41645
  case "npm":
41646
41646
  return {
41647
41647
  command: "npm",
41648
- args: ["update", "-g", PKG_NAME]
41648
+ args: ["install", "-g", `${PKG_NAME}@latest`]
41649
41649
  };
41650
41650
  case "pnpm":
41651
41651
  return {
41652
41652
  command: "pnpm",
41653
- args: ["update", "-g", PKG_NAME]
41653
+ args: ["add", "-g", `${PKG_NAME}@latest`]
41654
41654
  };
41655
41655
  case "yarn":
41656
41656
  return {
41657
41657
  command: "yarn",
41658
- args: ["global", "upgrade", PKG_NAME]
41658
+ args: ["global", "add", `${PKG_NAME}@latest`]
41659
41659
  };
41660
41660
  case "bun":
41661
41661
  return {
41662
41662
  command: "bun",
41663
- args: ["update", "-g", PKG_NAME]
41663
+ args: ["install", "-g", `${PKG_NAME}@latest`]
41664
41664
  };
41665
41665
  case "brew":
41666
41666
  return {
@@ -41672,7 +41672,7 @@ function getUpgradeArgs(method) {
41672
41672
  default:
41673
41673
  return {
41674
41674
  command: "npm",
41675
- args: ["update", "-g", PKG_NAME]
41675
+ args: ["install", "-g", `${PKG_NAME}@latest`]
41676
41676
  };
41677
41677
  }
41678
41678
  }
@@ -82393,7 +82393,7 @@ function getOpenRouterModelPricing(modelId) {
82393
82393
  const output = Number(p.completion ?? "0") * 1e6;
82394
82394
  const cacheRead = Number(p.input_cache_read ?? "0") * 1e6;
82395
82395
  const cacheWrite = p.input_cache_write ? Number(p.input_cache_write) * 1e6 : input;
82396
- if (Number.isNaN(input) || Number.isNaN(output))
82396
+ if (Number.isNaN(input) || Number.isNaN(output) || Number.isNaN(cacheRead) || Number.isNaN(cacheWrite))
82397
82397
  return null;
82398
82398
  return {
82399
82399
  input,
@@ -83007,6 +83007,63 @@ function getEffectiveCaps(modelId) {
83007
83007
  function isAnthropicNative(modelId) {
83008
83008
  return detectModelFamily(modelId) === "claude";
83009
83009
  }
83010
+ function getModelId(model) {
83011
+ if (typeof model === "string")
83012
+ return model;
83013
+ if (typeof model === "object" && model !== null && "modelId" in model) {
83014
+ return String(model.modelId);
83015
+ }
83016
+ return "";
83017
+ }
83018
+ function parseOpusVersion(base) {
83019
+ const m = base.match(/opus-(?:(\d+)[.-](\d{1,2})(?!\d)|(\d+))/);
83020
+ if (!m)
83021
+ return null;
83022
+ return {
83023
+ major: Number(m[1] ?? m[3]),
83024
+ minor: m[2] ? Number(m[2]) : 0
83025
+ };
83026
+ }
83027
+ function supportsTemperature(modelId) {
83028
+ const base = extractBaseModel(modelId);
83029
+ if (!base.startsWith("claude"))
83030
+ return true;
83031
+ const v = parseOpusVersion(base);
83032
+ if (!v)
83033
+ return true;
83034
+ return v.major < 5 && (v.major < 4 || v.minor < 7);
83035
+ }
83036
+ function getSupportedClaudeEfforts(modelId) {
83037
+ const base = extractBaseModel(modelId);
83038
+ if (!base.startsWith("claude"))
83039
+ return null;
83040
+ const v = parseOpusVersion(base);
83041
+ if (v && (v.major >= 5 || v.major === 4 && v.minor >= 7)) {
83042
+ return ["max", "xhigh", "high", "medium", "low"];
83043
+ }
83044
+ if (base.includes("opus-4-6") || base.includes("opus-4.6") || base.includes("sonnet-4-6") || base.includes("sonnet-4.6")) {
83045
+ return ["max", "high", "medium", "low"];
83046
+ }
83047
+ if (base.includes("opus-4-5") || base.includes("opus-4.5")) {
83048
+ return ["high", "medium", "low"];
83049
+ }
83050
+ return ["high", "medium", "low"];
83051
+ }
83052
+ function clampEffort(modelId, effort) {
83053
+ const supported = getSupportedClaudeEfforts(modelId);
83054
+ if (!supported)
83055
+ return null;
83056
+ if (supported.includes(effort))
83057
+ return effort;
83058
+ const order = ["max", "xhigh", "high", "medium", "low"];
83059
+ const requestedIdx = order.indexOf(effort);
83060
+ for (let i2 = requestedIdx;i2 < order.length; i2++) {
83061
+ const level = order[i2];
83062
+ if (level && supported.includes(level))
83063
+ return level;
83064
+ }
83065
+ return supported[supported.length - 1] ?? null;
83066
+ }
83010
83067
  function supportsProgrammaticToolCalling(modelId) {
83011
83068
  const base = extractBaseModel(modelId);
83012
83069
  const gen = getClaudeGen(base);
@@ -83116,7 +83173,9 @@ async function buildAnthropicOptions(modelId, caps, config2) {
83116
83173
  }
83117
83174
  }
83118
83175
  if (caps.effort && config2.performance?.effort && config2.performance.effort !== "off") {
83119
- opts.effort = config2.performance.effort;
83176
+ const clamped = clampEffort(modelId, config2.performance.effort);
83177
+ if (clamped)
83178
+ opts.effort = clamped;
83120
83179
  }
83121
83180
  if (caps.speed && config2.performance?.speed && config2.performance.speed !== "off") {
83122
83181
  opts.speed = config2.performance.speed;
@@ -83243,7 +83302,7 @@ function degradeProviderOptions(modelId, level) {
83243
83302
  function isProviderOptionsError(error48) {
83244
83303
  const msg = error48 instanceof Error ? error48.message : String(error48);
83245
83304
  const lower = msg.toLowerCase();
83246
- return lower.includes("not supported") || lower.includes("not available") || lower.includes("does not support") || lower.includes("invalid parameter") || lower.includes("inputschema") || lower.includes("thinking is not supported") || lower.includes("adaptive thinking") || lower.includes("clear_thinking") || lower.includes("context management") || lower.includes("unknown parameter");
83305
+ return lower.includes("not supported") || lower.includes("not available") || lower.includes("does not support") || lower.includes("invalid parameter") || lower.includes("inputschema") || lower.includes("thinking is not supported") || lower.includes("adaptive thinking") || lower.includes("clear_thinking") || lower.includes("context management") || lower.includes("unknown parameter") || lower.includes("temperature is deprecated");
83247
83306
  }
83248
83307
  var ANTHROPIC_FULL, OPENAI_FULL, GATEWAY_FULL, PROVIDER_CONSTRAINTS, NO_SUPPORT, LEGACY_PREFIXES, CACHE_EPHEMERAL, EPHEMERAL_CACHE;
83249
83308
  var init_provider_options = __esm(() => {
@@ -367004,7 +367063,9 @@ function createWebSearchAgent(model, opts) {
367004
367063
  return new ToolLoopAgent({
367005
367064
  id: "web-search",
367006
367065
  model,
367007
- temperature: 0,
367066
+ ...supportsTemperature(getModelId(model)) ? {
367067
+ temperature: 0
367068
+ } : {},
367008
367069
  tools: {
367009
367070
  web_search: tool({
367010
367071
  description: webSearchScraper.description,
@@ -367059,6 +367120,7 @@ Output a clear, well-structured summary of your findings. Include source URLs fo
367059
367120
  var init_web_search = __esm(() => {
367060
367121
  init_dist22();
367061
367122
  init_zod();
367123
+ init_provider_options();
367062
367124
  init_fetch_page();
367063
367125
  init_web_search_scraper();
367064
367126
  init_stream_options();
@@ -370075,7 +370137,9 @@ function createCodeAgent(model, options) {
370075
370137
  return new ToolLoopAgent({
370076
370138
  id: options?.agentId ?? "code",
370077
370139
  model,
370078
- temperature: 0,
370140
+ ...supportsTemperature(getModelId(model)) ? {
370141
+ temperature: 0
370142
+ } : {},
370079
370143
  tools: allTools,
370080
370144
  instructions: {
370081
370145
  role: "system",
@@ -370192,7 +370256,9 @@ function createExploreAgent(model, options) {
370192
370256
  return new ToolLoopAgent({
370193
370257
  id: options?.agentId ?? "explore",
370194
370258
  model,
370195
- temperature: 0,
370259
+ ...supportsTemperature(getModelId(model)) ? {
370260
+ temperature: 0
370261
+ } : {},
370196
370262
  tools: allTools,
370197
370263
  instructions: {
370198
370264
  role: "system",
@@ -374494,7 +374560,7 @@ function sleep(ms, signal) {
374494
374560
  });
374495
374561
  });
374496
374562
  }
374497
- function getModelId(model) {
374563
+ function getModelId2(model) {
374498
374564
  return typeof model === "object" && "modelId" in model ? String(model.modelId) : "unknown";
374499
374565
  }
374500
374566
  function classifyTask(task, models) {
@@ -374503,8 +374569,8 @@ function classifyTask(task, models) {
374503
374569
  if (task.role === "code")
374504
374570
  return "ember";
374505
374571
  if (models?.sparkModel) {
374506
- const sparkId = getModelId(models.sparkModel);
374507
- const parentId = getModelId(models.defaultModel);
374572
+ const sparkId = getModelId2(models.sparkModel);
374573
+ const parentId = getModelId2(models.defaultModel);
374508
374574
  if (sparkId !== parentId)
374509
374575
  return "ember";
374510
374576
  }
@@ -376645,7 +376711,9 @@ function createForgeAgent({
376645
376711
  return new ToolLoopAgent({
376646
376712
  id: "forge",
376647
376713
  model,
376648
- temperature: 0,
376714
+ ...supportsTemperature(fullModelId ?? getModelId(model)) ? {
376715
+ temperature: 0
376716
+ } : {},
376649
376717
  tools: allTools,
376650
376718
  stopWhen: () => false,
376651
376719
  instructions: isProxyClaude ? undefined : {
@@ -391943,7 +392011,9 @@ ${s.signature ? `${s.signature}
391943
392011
  usage
391944
392012
  } = await generateText({
391945
392013
  model,
391946
- temperature: 0,
392014
+ ...supportsTemperature(modelId) ? {
392015
+ temperature: 0
392016
+ } : {},
391947
392017
  providerOptions: EPHEMERAL_CACHE,
391948
392018
  system: ["Summarize each code symbol in ONE line (max 80 chars). Focus on BEHAVIOR: what it does, key side effects, non-obvious logic.", "BAD: 'Checks if Neovim is available' (restates name)", "GOOD: 'Pings nvim RPC, returns false on timeout or socket error'", "BAD: 'Renders a widget component' (generic)", "GOOD: 'Memoized tree-view with virtual scroll, collapses on blur'", "Output ONLY lines: SymbolName: summary", "No numbering, no backticks, no extra text."].join(`
391949
392019
  `),
@@ -459216,13 +459286,16 @@ function computeTotalCostFromBreakdown(breakdown) {
459216
459286
  let total = 0;
459217
459287
  for (const [modelId, usage] of Object.entries(breakdown)) {
459218
459288
  const p2 = matchPricing(modelId);
459219
- total += usage.input / 1e6 * p2.input + usage.cacheWrite / 1e6 * p2.cacheWrite + usage.cacheRead / 1e6 * p2.cacheRead + usage.output / 1e6 * p2.output;
459289
+ const cost = (usage.input ?? 0) / 1e6 * p2.input + (usage.cacheWrite ?? 0) / 1e6 * p2.cacheWrite + (usage.cacheRead ?? 0) / 1e6 * p2.cacheRead + (usage.output ?? 0) / 1e6 * p2.output;
459290
+ if (Number.isFinite(cost))
459291
+ total += cost;
459220
459292
  }
459221
459293
  return total;
459222
459294
  }
459223
459295
  function computeModelCost(modelId, usage) {
459224
459296
  const p2 = matchPricing(modelId);
459225
- return usage.input / 1e6 * p2.input + usage.cacheWrite / 1e6 * p2.cacheWrite + usage.cacheRead / 1e6 * p2.cacheRead + usage.output / 1e6 * p2.output;
459297
+ const cost = (usage.input ?? 0) / 1e6 * p2.input + (usage.cacheWrite ?? 0) / 1e6 * p2.cacheWrite + (usage.cacheRead ?? 0) / 1e6 * p2.cacheRead + (usage.output ?? 0) / 1e6 * p2.output;
459298
+ return Number.isFinite(cost) ? cost : 0;
459226
459299
  }
459227
459300
  function accumulateModelUsage(breakdown, modelId, delta) {
459228
459301
  const prev = breakdown[modelId] ?? {
@@ -461603,7 +461676,9 @@ function handleTabs(_input, ctx) {
461603
461676
  onSelect: (tabId) => ctx.tabMgr.switchTab(tabId)
461604
461677
  });
461605
461678
  }
461606
- function handleNewTab(_input, _ctx) {
461679
+ function handleNewTab(_input, ctx) {
461680
+ if (!ctx.tabMgr.canCreateTab)
461681
+ return;
461607
461682
  useUIStore.getState().openModal("tabNamePopup");
461608
461683
  }
461609
461684
  function handleCloseTab(_input, ctx) {
@@ -464320,7 +464395,12 @@ function useGlobalKeyboard(t0) {
464320
464395
  return consume(_temp22);
464321
464396
  }
464322
464397
  if (evt.ctrl && evt.name === "t") {
464323
- return consume(_temp32);
464398
+ return consume(() => {
464399
+ if (!tabMgr.canCreateTab) {
464400
+ return;
464401
+ }
464402
+ useUIStore.getState().openModal("tabNamePopup");
464403
+ });
464324
464404
  }
464325
464405
  if (evt.ctrl && evt.name === "n") {
464326
464406
  return consume(() => newSession());
@@ -464329,19 +464409,19 @@ function useGlobalKeyboard(t0) {
464329
464409
  return consume(() => cycleMode());
464330
464410
  }
464331
464411
  if (evt.ctrl && evt.name === "g") {
464332
- return consume(_temp4);
464412
+ return consume(_temp32);
464333
464413
  }
464334
464414
  if (evt.ctrl && evt.name === "k") {
464335
- return consume(_temp5);
464415
+ return consume(_temp4);
464336
464416
  }
464337
464417
  if (evt.ctrl && evt.name === "h") {
464338
- return consume(_temp6);
464418
+ return consume(_temp5);
464339
464419
  }
464340
464420
  if (evt.ctrl && evt.name === "p") {
464341
- return consume(_temp7);
464421
+ return consume(_temp6);
464342
464422
  }
464343
464423
  if (evt.meta && evt.name === "r") {
464344
- return consume(_temp8);
464424
+ return consume(_temp7);
464345
464425
  }
464346
464426
  if (evt.ctrl && evt.name === "w") {
464347
464427
  return consume(() => {
@@ -464387,7 +464467,7 @@ function useGlobalKeyboard(t0) {
464387
464467
  const store = useCheckpointStore.getState();
464388
464468
  const tid = tabMgr.activeTabId;
464389
464469
  const cps = store.getCheckpoints(tid);
464390
- const active = cps.filter(_temp9);
464470
+ const active = cps.filter(_temp8);
464391
464471
  if (active.length === 0) {
464392
464472
  return;
464393
464473
  }
@@ -464408,7 +464488,7 @@ function useGlobalKeyboard(t0) {
464408
464488
  const store_0 = useCheckpointStore.getState();
464409
464489
  const tid_0 = tabMgr.activeTabId;
464410
464490
  const cps_0 = store_0.getCheckpoints(tid_0);
464411
- const active_0 = cps_0.filter(_temp0);
464491
+ const active_0 = cps_0.filter(_temp9);
464412
464492
  if (active_0.length === 0) {
464413
464493
  return;
464414
464494
  }
@@ -464441,29 +464521,26 @@ function useGlobalKeyboard(t0) {
464441
464521
  }
464442
464522
  useKeyboard(t1);
464443
464523
  }
464444
- function _temp0(c_1) {
464524
+ function _temp9(c_1) {
464445
464525
  return !c_1.undone;
464446
464526
  }
464447
- function _temp9(c) {
464527
+ function _temp8(c) {
464448
464528
  return !c.undone;
464449
464529
  }
464450
- function _temp8() {
464451
- return useUIStore.getState().toggleModal("errorLog");
464452
- }
464453
464530
  function _temp7() {
464454
- return useUIStore.getState().toggleModal("sessionPicker");
464531
+ return useUIStore.getState().toggleModal("errorLog");
464455
464532
  }
464456
464533
  function _temp6() {
464457
- return useUIStore.getState().toggleModal("commandPalette");
464534
+ return useUIStore.getState().toggleModal("sessionPicker");
464458
464535
  }
464459
464536
  function _temp5() {
464460
464537
  return useUIStore.getState().toggleModal("commandPalette");
464461
464538
  }
464462
464539
  function _temp4() {
464463
- return useUIStore.getState().toggleModal("gitMenu");
464540
+ return useUIStore.getState().toggleModal("commandPalette");
464464
464541
  }
464465
464542
  function _temp32() {
464466
- return useUIStore.getState().openModal("tabNamePopup");
464543
+ return useUIStore.getState().toggleModal("gitMenu");
464467
464544
  }
464468
464545
  function _temp22() {
464469
464546
  return useUIStore.getState().toggleModal("skillSearch");
@@ -465075,6 +465152,7 @@ function useTabs() {
465075
465152
  activeTabId: activeTabId2,
465076
465153
  activeTab,
465077
465154
  tabCount: tabs.length,
465155
+ canCreateTab: tabs.length < MAX_TABS,
465078
465156
  activeTabIndex,
465079
465157
  createTab,
465080
465158
  closeTab,
@@ -468186,7 +468264,9 @@ async function buildV2Summary(opts) {
468186
468264
  try {
468187
468265
  const genResult = await generateText({
468188
468266
  model,
468189
- temperature: 0,
468267
+ ...supportsTemperature(getModelId(model)) ? {
468268
+ temperature: 0
468269
+ } : {},
468190
468270
  maxOutputTokens: 2048,
468191
468271
  maxRetries: 0,
468192
468272
  ...abortSignal ? {
@@ -468274,6 +468354,7 @@ function messageTextFull(msg) {
468274
468354
  var init_summarize = __esm(() => {
468275
468355
  init_dist22();
468276
468356
  init_errors();
468357
+ init_provider_options();
468277
468358
  });
468278
468359
 
468279
468360
  // src/core/compaction/types.ts
@@ -469525,7 +469606,9 @@ function useChat({
469525
469606
  `);
469526
469607
  const v1Result = await generateText({
469527
469608
  model,
469528
- temperature: 0,
469609
+ ...supportsTemperature(activeModelRef.current) ? {
469610
+ temperature: 0
469611
+ } : {},
469529
469612
  maxOutputTokens: 8192,
469530
469613
  abortSignal: compactAbort.signal,
469531
469614
  ...providerOptions && Object.keys(providerOptions).length > 0 ? {
@@ -481224,7 +481307,7 @@ function _temp82(tc_0) {
481224
481307
  function _temp92(tc_1) {
481225
481308
  return filterQuietTools(tc_1.name) && !SUBAGENT_NAMES.has(tc_1.name);
481226
481309
  }
481227
- function _temp02(tc_2) {
481310
+ function _temp0(tc_2) {
481228
481311
  return {
481229
481312
  id: tc_2.id,
481230
481313
  name: tc_2.name,
@@ -481857,7 +481940,7 @@ var init_MessageList = __esm(async () => {
481857
481940
  }
481858
481941
  let t112;
481859
481942
  if ($5[11] !== msg.toolCalls) {
481860
- t112 = (msg.toolCalls ?? []).filter(_temp92).map(_temp02);
481943
+ t112 = (msg.toolCalls ?? []).filter(_temp92).map(_temp0);
481861
481944
  $5[11] = msg.toolCalls;
481862
481945
  $5[12] = t112;
481863
481946
  } else {
@@ -486607,64 +486690,6 @@ var init_TabInstance = __esm(async () => {
486607
486690
  messages: chat.messages,
486608
486691
  expanded: codeExpanded
486609
486692
  }, undefined, false, undefined, this),
486610
- checkpoints.length > 1 && /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("box", {
486611
- flexShrink: 0,
486612
- height: 1,
486613
- paddingX: 1,
486614
- flexDirection: "row",
486615
- justifyContent: "flex-end",
486616
- children: /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("text", {
486617
- fg: t2.textDim,
486618
- children: [
486619
- /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
486620
- fg: t2.brand,
486621
- children: "\u25C6"
486622
- }, undefined, false, undefined, this),
486623
- " latest",
486624
- /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
486625
- fg: t2.textFaint,
486626
- children: " \u2502 "
486627
- }, undefined, false, undefined, this),
486628
- /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
486629
- fg: t2.warning,
486630
- children: "\u25CF"
486631
- }, undefined, false, undefined, this),
486632
- " viewing",
486633
- /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
486634
- fg: t2.textFaint,
486635
- children: " \u2502 "
486636
- }, undefined, false, undefined, this),
486637
- /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
486638
- fg: t2.textMuted,
486639
- children: "\u25CF"
486640
- }, undefined, false, undefined, this),
486641
- " edits",
486642
- /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
486643
- fg: t2.textFaint,
486644
- children: " \u2502 "
486645
- }, undefined, false, undefined, this),
486646
- /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
486647
- fg: t2.textFaint,
486648
- children: "\u25CB"
486649
- }, undefined, false, undefined, this),
486650
- " read",
486651
- /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
486652
- fg: t2.textFaint,
486653
- children: " \u2502 "
486654
- }, undefined, false, undefined, this),
486655
- /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
486656
- fg: t2.textMuted,
486657
- children: "^B"
486658
- }, undefined, false, undefined, this),
486659
- "/",
486660
- /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
486661
- fg: t2.textMuted,
486662
- children: "^F"
486663
- }, undefined, false, undefined, this),
486664
- " navigate"
486665
- ]
486666
- }, undefined, true, undefined, this)
486667
- }, undefined, false, undefined, this),
486668
486693
  /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("box", {
486669
486694
  flexGrow: 1,
486670
486695
  flexShrink: 1,
@@ -487014,6 +487039,8 @@ function approach2(current, target) {
487014
487039
  return Math.abs(next - target) < 1 ? target : Math.round(next);
487015
487040
  }
487016
487041
  function fmtCost(usd) {
487042
+ if (!Number.isFinite(usd))
487043
+ return "$0";
487017
487044
  if (usd < 0.01)
487018
487045
  return `$${usd.toFixed(3)}`;
487019
487046
  return `$${usd.toFixed(2)}`;
@@ -487044,7 +487071,7 @@ function TokenDisplay() {
487044
487071
  localRef.current = modelIds.length > 0 && modelIds.every((mid) => isModelLocal(mid));
487045
487072
  freeRef.current = !localRef.current && modelIds.length > 0 && modelIds.every((mid_0) => isModelFree(mid_0));
487046
487073
  const rawCost = breakdown && modelIds.length > 0 ? computeTotalCostFromBreakdown(breakdown) : 0;
487047
- costRef.current = Math.round(rawCost * 100);
487074
+ costRef.current = Number.isFinite(rawCost) ? Math.round(rawCost * 100) : 0;
487048
487075
  const totalInput = usage.prompt + usage.subagentInput + usage.cacheRead + usage.cacheWrite;
487049
487076
  cacheHitRef.current = totalInput > 0 ? Math.round(usage.cacheRead / totalInput * 100) : 0;
487050
487077
  }), []);
@@ -507747,7 +507774,7 @@ function MCPSettings(t0) {
507747
507774
  return;
507748
507775
  }
507749
507776
  if (srv_1 && evt.name === "p" && evt.ctrl && srv_1.status === "ready" && mcpManager) {
507750
- mcpManager.ping(srv_1.config.name).catch(_temp03);
507777
+ mcpManager.ping(srv_1.config.name).catch(_temp02);
507751
507778
  return;
507752
507779
  }
507753
507780
  if (evt.name === "t" && evt.ctrl) {
@@ -508188,7 +508215,7 @@ function _temp103(f_2) {
508188
508215
  function _temp110(f_1) {
508189
508216
  return f_1.slice(0, -1);
508190
508217
  }
508191
- function _temp03() {}
508218
+ function _temp02() {}
508192
508219
  function _temp93(c_0) {
508193
508220
  return c_0 === "no" ? "yes" : "no";
508194
508221
  }
@@ -510291,7 +510318,7 @@ function detectInitialScope(project) {
510291
510318
  return "global";
510292
510319
  }
510293
510320
  function ProviderSettings(t0) {
510294
- const $5 = import_compiler_runtime67.c(111);
510321
+ const $5 = import_compiler_runtime67.c(115);
510295
510322
  const {
510296
510323
  visible,
510297
510324
  globalConfig: globalConfig2,
@@ -510376,10 +510403,32 @@ function ProviderSettings(t0) {
510376
510403
  }
510377
510404
  import_react117.useEffect(t5, t6);
510378
510405
  const isBudgetDisabled = vals.thinkingMode !== "enabled";
510406
+ const isThinkingDisabled = vals.thinkingMode === "off" || vals.thinkingMode === "disabled";
510379
510407
  let t7;
510380
- if ($5[14] !== isBudgetDisabled || $5[15] !== onUpdate || $5[16] !== scope || $5[17] !== vals) {
510381
- t7 = (item) => {
510408
+ if ($5[14] !== isBudgetDisabled || $5[15] !== isThinkingDisabled) {
510409
+ t7 = (key3) => {
510410
+ if (key3 === "budgetTokens") {
510411
+ return isBudgetDisabled;
510412
+ }
510413
+ if (key3 === "clearThinking") {
510414
+ return isThinkingDisabled;
510415
+ }
510416
+ return false;
510417
+ };
510418
+ $5[14] = isBudgetDisabled;
510419
+ $5[15] = isThinkingDisabled;
510420
+ $5[16] = t7;
510421
+ } else {
510422
+ t7 = $5[16];
510423
+ }
510424
+ const isItemDisabled = t7;
510425
+ let t8;
510426
+ if ($5[17] !== isBudgetDisabled || $5[18] !== isItemDisabled || $5[19] !== onUpdate || $5[20] !== scope || $5[21] !== vals) {
510427
+ t8 = (item) => {
510382
510428
  if (item.type === "toggle") {
510429
+ if (isItemDisabled(item.key)) {
510430
+ return;
510431
+ }
510383
510432
  const current = vals[item.key];
510384
510433
  onUpdate(buildPatch(item.key, !current), scope);
510385
510434
  return;
@@ -510401,18 +510450,19 @@ function ProviderSettings(t0) {
510401
510450
  onUpdate(buildPatch(item.key, item.options[nextIdx_0]), scope);
510402
510451
  }
510403
510452
  };
510404
- $5[14] = isBudgetDisabled;
510405
- $5[15] = onUpdate;
510406
- $5[16] = scope;
510407
- $5[17] = vals;
510408
- $5[18] = t7;
510453
+ $5[17] = isBudgetDisabled;
510454
+ $5[18] = isItemDisabled;
510455
+ $5[19] = onUpdate;
510456
+ $5[20] = scope;
510457
+ $5[21] = vals;
510458
+ $5[22] = t8;
510409
510459
  } else {
510410
- t7 = $5[18];
510460
+ t8 = $5[22];
510411
510461
  }
510412
- const cycleValue = t7;
510413
- let t8;
510414
- if ($5[19] !== adjustScroll || $5[20] !== cursor || $5[21] !== cycleValue || $5[22] !== globalConfig2 || $5[23] !== items || $5[24] !== onClose || $5[25] !== onUpdate || $5[26] !== projectConfig || $5[27] !== setCursor || $5[28] !== tabIdx || $5[29] !== visible) {
510415
- t8 = (evt) => {
510462
+ const cycleValue = t8;
510463
+ let t9;
510464
+ if ($5[23] !== adjustScroll || $5[24] !== cursor || $5[25] !== cycleValue || $5[26] !== globalConfig2 || $5[27] !== items || $5[28] !== onClose || $5[29] !== onUpdate || $5[30] !== projectConfig || $5[31] !== setCursor || $5[32] !== tabIdx || $5[33] !== visible) {
510465
+ t9 = (evt) => {
510416
510466
  if (!visible) {
510417
510467
  return;
510418
510468
  }
@@ -510469,30 +510519,30 @@ function ProviderSettings(t0) {
510469
510519
  return;
510470
510520
  }
510471
510521
  };
510472
- $5[19] = adjustScroll;
510473
- $5[20] = cursor;
510474
- $5[21] = cycleValue;
510475
- $5[22] = globalConfig2;
510476
- $5[23] = items;
510477
- $5[24] = onClose;
510478
- $5[25] = onUpdate;
510479
- $5[26] = projectConfig;
510480
- $5[27] = setCursor;
510481
- $5[28] = tabIdx;
510482
- $5[29] = visible;
510483
- $5[30] = t8;
510522
+ $5[23] = adjustScroll;
510523
+ $5[24] = cursor;
510524
+ $5[25] = cycleValue;
510525
+ $5[26] = globalConfig2;
510526
+ $5[27] = items;
510527
+ $5[28] = onClose;
510528
+ $5[29] = onUpdate;
510529
+ $5[30] = projectConfig;
510530
+ $5[31] = setCursor;
510531
+ $5[32] = tabIdx;
510532
+ $5[33] = visible;
510533
+ $5[34] = t9;
510484
510534
  } else {
510485
- t8 = $5[30];
510535
+ t9 = $5[34];
510486
510536
  }
510487
- useKeyboard(t8);
510537
+ useKeyboard(t9);
510488
510538
  if (!visible) {
510489
510539
  return null;
510490
510540
  }
510491
510541
  let t10;
510492
- let t9;
510493
- if ($5[31] === Symbol.for("react.memo_cache_sentinel")) {
510494
- t9 = icon("system");
510495
- t10 = [{
510542
+ let t11;
510543
+ if ($5[35] === Symbol.for("react.memo_cache_sentinel")) {
510544
+ t10 = icon("system");
510545
+ t11 = [{
510496
510546
  key: "tab",
510497
510547
  label: "switch"
510498
510548
  }, {
@@ -510508,15 +510558,15 @@ function ProviderSettings(t0) {
510508
510558
  key: "esc",
510509
510559
  label: "close"
510510
510560
  }];
510511
- $5[31] = t10;
510512
- $5[32] = t9;
510561
+ $5[35] = t10;
510562
+ $5[36] = t11;
510513
510563
  } else {
510514
- t10 = $5[31];
510515
- t9 = $5[32];
510564
+ t10 = $5[35];
510565
+ t11 = $5[36];
510516
510566
  }
510517
- let t11;
510518
- if ($5[33] !== t2.brandSecondary || $5[34] !== t2.textFaint || $5[35] !== t2.textMuted || $5[36] !== tab) {
510519
- t11 = TABS3.map((tabItem, i4) => /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("text", {
510567
+ let t12;
510568
+ if ($5[37] !== t2.brandSecondary || $5[38] !== t2.textFaint || $5[39] !== t2.textMuted || $5[40] !== tab) {
510569
+ t12 = TABS3.map((tabItem, i4) => /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("text", {
510520
510570
  bg: POPUP_BG,
510521
510571
  children: [
510522
510572
  i4 > 0 ? /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
@@ -510532,68 +510582,68 @@ function ProviderSettings(t0) {
510532
510582
  }, undefined, false, undefined, this)
510533
510583
  ]
510534
510584
  }, tabItem, true, undefined, this));
510535
- $5[33] = t2.brandSecondary;
510536
- $5[34] = t2.textFaint;
510537
- $5[35] = t2.textMuted;
510538
- $5[36] = tab;
510539
- $5[37] = t11;
510585
+ $5[37] = t2.brandSecondary;
510586
+ $5[38] = t2.textFaint;
510587
+ $5[39] = t2.textMuted;
510588
+ $5[40] = tab;
510589
+ $5[41] = t12;
510540
510590
  } else {
510541
- t11 = $5[37];
510591
+ t12 = $5[41];
510542
510592
  }
510543
- let t12;
510544
- if ($5[38] !== innerW || $5[39] !== t11) {
510545
- t12 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(PopupRow, {
510593
+ let t13;
510594
+ if ($5[42] !== innerW || $5[43] !== t12) {
510595
+ t13 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(PopupRow, {
510546
510596
  w: innerW,
510547
- children: t11
510597
+ children: t12
510548
510598
  }, undefined, false, undefined, this);
510549
- $5[38] = innerW;
510550
- $5[39] = t11;
510551
- $5[40] = t12;
510599
+ $5[42] = innerW;
510600
+ $5[43] = t12;
510601
+ $5[44] = t13;
510552
510602
  } else {
510553
- t12 = $5[40];
510603
+ t13 = $5[44];
510554
510604
  }
510555
- const t13 = t2.textFaint;
510556
- let t14;
510557
- if ($5[41] !== innerW) {
510558
- t14 = "\u2500".repeat(innerW - 2);
510559
- $5[41] = innerW;
510560
- $5[42] = t14;
510605
+ const t14 = t2.textFaint;
510606
+ let t15;
510607
+ if ($5[45] !== innerW) {
510608
+ t15 = "\u2500".repeat(innerW - 2);
510609
+ $5[45] = innerW;
510610
+ $5[46] = t15;
510561
510611
  } else {
510562
- t14 = $5[42];
510612
+ t15 = $5[46];
510563
510613
  }
510564
- let t15;
510565
- if ($5[43] !== t2.textFaint || $5[44] !== t14) {
510566
- t15 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("text", {
510567
- fg: t13,
510614
+ let t16;
510615
+ if ($5[47] !== t2.textFaint || $5[48] !== t15) {
510616
+ t16 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("text", {
510617
+ fg: t14,
510568
510618
  bg: POPUP_BG,
510569
- children: t14
510619
+ children: t15
510570
510620
  }, undefined, false, undefined, this);
510571
- $5[43] = t2.textFaint;
510572
- $5[44] = t14;
510573
- $5[45] = t15;
510621
+ $5[47] = t2.textFaint;
510622
+ $5[48] = t15;
510623
+ $5[49] = t16;
510574
510624
  } else {
510575
- t15 = $5[45];
510625
+ t16 = $5[49];
510576
510626
  }
510577
- let t16;
510578
- if ($5[46] !== innerW || $5[47] !== t15) {
510579
- t16 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(PopupRow, {
510627
+ let t17;
510628
+ if ($5[50] !== innerW || $5[51] !== t16) {
510629
+ t17 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(PopupRow, {
510580
510630
  w: innerW,
510581
- children: t15
510631
+ children: t16
510582
510632
  }, undefined, false, undefined, this);
510583
- $5[46] = innerW;
510584
- $5[47] = t15;
510585
- $5[48] = t16;
510633
+ $5[50] = innerW;
510634
+ $5[51] = t16;
510635
+ $5[52] = t17;
510586
510636
  } else {
510587
- t16 = $5[48];
510637
+ t17 = $5[52];
510588
510638
  }
510589
- let t17;
510590
- if ($5[49] !== cursor || $5[50] !== innerW || $5[51] !== isBudgetDisabled || $5[52] !== items || $5[53] !== maxVisible || $5[54] !== projectConfig || $5[55] !== scrollOffset || $5[56] !== t2.brandAlt || $5[57] !== t2.brandSecondary || $5[58] !== t2.info || $5[59] !== t2.success || $5[60] !== t2.textDim || $5[61] !== t2.textFaint || $5[62] !== t2.textMuted || $5[63] !== vals) {
510591
- let t182;
510592
- if ($5[65] !== cursor || $5[66] !== innerW || $5[67] !== isBudgetDisabled || $5[68] !== projectConfig || $5[69] !== scrollOffset || $5[70] !== t2.brandAlt || $5[71] !== t2.brandSecondary || $5[72] !== t2.info || $5[73] !== t2.success || $5[74] !== t2.textDim || $5[75] !== t2.textFaint || $5[76] !== t2.textMuted || $5[77] !== vals) {
510593
- t182 = (item_1, vi) => {
510639
+ let t18;
510640
+ if ($5[53] !== cursor || $5[54] !== innerW || $5[55] !== isItemDisabled || $5[56] !== items || $5[57] !== maxVisible || $5[58] !== projectConfig || $5[59] !== scrollOffset || $5[60] !== t2.brandAlt || $5[61] !== t2.brandSecondary || $5[62] !== t2.info || $5[63] !== t2.success || $5[64] !== t2.textDim || $5[65] !== t2.textFaint || $5[66] !== t2.textMuted || $5[67] !== vals) {
510641
+ let t192;
510642
+ if ($5[69] !== cursor || $5[70] !== innerW || $5[71] !== isItemDisabled || $5[72] !== projectConfig || $5[73] !== scrollOffset || $5[74] !== t2.brandAlt || $5[75] !== t2.brandSecondary || $5[76] !== t2.info || $5[77] !== t2.success || $5[78] !== t2.textDim || $5[79] !== t2.textFaint || $5[80] !== t2.textMuted || $5[81] !== vals) {
510643
+ t192 = (item_1, vi) => {
510594
510644
  const i_0 = vi + scrollOffset;
510595
510645
  const isSelected = i_0 === cursor;
510596
- const disabled = item_1.key === "budgetTokens" && isBudgetDisabled;
510646
+ const disabled = isItemDisabled(item_1.key);
510597
510647
  const bg2 = isSelected ? POPUP_HL : POPUP_BG;
510598
510648
  const raw2 = vals[item_1.key];
510599
510649
  const valColor = disabled ? t2.textFaint : item_1.type === "toggle" ? raw2 ? t2.success : t2.textMuted : raw2 === "off" ? t2.textMuted : t2.brandAlt;
@@ -510654,46 +510704,46 @@ function ProviderSettings(t0) {
510654
510704
  ]
510655
510705
  }, item_1.key, true, undefined, this);
510656
510706
  };
510657
- $5[65] = cursor;
510658
- $5[66] = innerW;
510659
- $5[67] = isBudgetDisabled;
510660
- $5[68] = projectConfig;
510661
- $5[69] = scrollOffset;
510662
- $5[70] = t2.brandAlt;
510663
- $5[71] = t2.brandSecondary;
510664
- $5[72] = t2.info;
510665
- $5[73] = t2.success;
510666
- $5[74] = t2.textDim;
510667
- $5[75] = t2.textFaint;
510668
- $5[76] = t2.textMuted;
510669
- $5[77] = vals;
510670
- $5[78] = t182;
510707
+ $5[69] = cursor;
510708
+ $5[70] = innerW;
510709
+ $5[71] = isItemDisabled;
510710
+ $5[72] = projectConfig;
510711
+ $5[73] = scrollOffset;
510712
+ $5[74] = t2.brandAlt;
510713
+ $5[75] = t2.brandSecondary;
510714
+ $5[76] = t2.info;
510715
+ $5[77] = t2.success;
510716
+ $5[78] = t2.textDim;
510717
+ $5[79] = t2.textFaint;
510718
+ $5[80] = t2.textMuted;
510719
+ $5[81] = vals;
510720
+ $5[82] = t192;
510671
510721
  } else {
510672
- t182 = $5[78];
510722
+ t192 = $5[82];
510673
510723
  }
510674
- t17 = items.slice(scrollOffset, scrollOffset + maxVisible).map(t182);
510675
- $5[49] = cursor;
510676
- $5[50] = innerW;
510677
- $5[51] = isBudgetDisabled;
510678
- $5[52] = items;
510679
- $5[53] = maxVisible;
510680
- $5[54] = projectConfig;
510681
- $5[55] = scrollOffset;
510682
- $5[56] = t2.brandAlt;
510683
- $5[57] = t2.brandSecondary;
510684
- $5[58] = t2.info;
510685
- $5[59] = t2.success;
510686
- $5[60] = t2.textDim;
510687
- $5[61] = t2.textFaint;
510688
- $5[62] = t2.textMuted;
510689
- $5[63] = vals;
510690
- $5[64] = t17;
510724
+ t18 = items.slice(scrollOffset, scrollOffset + maxVisible).map(t192);
510725
+ $5[53] = cursor;
510726
+ $5[54] = innerW;
510727
+ $5[55] = isItemDisabled;
510728
+ $5[56] = items;
510729
+ $5[57] = maxVisible;
510730
+ $5[58] = projectConfig;
510731
+ $5[59] = scrollOffset;
510732
+ $5[60] = t2.brandAlt;
510733
+ $5[61] = t2.brandSecondary;
510734
+ $5[62] = t2.info;
510735
+ $5[63] = t2.success;
510736
+ $5[64] = t2.textDim;
510737
+ $5[65] = t2.textFaint;
510738
+ $5[66] = t2.textMuted;
510739
+ $5[67] = vals;
510740
+ $5[68] = t18;
510691
510741
  } else {
510692
- t17 = $5[64];
510742
+ t18 = $5[68];
510693
510743
  }
510694
- let t18;
510695
- if ($5[79] !== innerW || $5[80] !== items.length || $5[81] !== t2.textMuted) {
510696
- t18 = items.length === 0 && /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(PopupRow, {
510744
+ let t19;
510745
+ if ($5[83] !== innerW || $5[84] !== items.length || $5[85] !== t2.textMuted) {
510746
+ t19 = items.length === 0 && /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(PopupRow, {
510697
510747
  w: innerW,
510698
510748
  children: /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("text", {
510699
510749
  bg: POPUP_BG,
@@ -510704,81 +510754,81 @@ function ProviderSettings(t0) {
510704
510754
  ]
510705
510755
  }, undefined, true, undefined, this)
510706
510756
  }, undefined, false, undefined, this);
510707
- $5[79] = innerW;
510708
- $5[80] = items.length;
510709
- $5[81] = t2.textMuted;
510710
- $5[82] = t18;
510757
+ $5[83] = innerW;
510758
+ $5[84] = items.length;
510759
+ $5[85] = t2.textMuted;
510760
+ $5[86] = t19;
510711
510761
  } else {
510712
- t18 = $5[82];
510762
+ t19 = $5[86];
510713
510763
  }
510714
- let t19;
510715
- if ($5[83] !== t17 || $5[84] !== t18) {
510716
- t19 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("box", {
510764
+ let t20;
510765
+ if ($5[87] !== t18 || $5[88] !== t19) {
510766
+ t20 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("box", {
510717
510767
  flexDirection: "column",
510718
510768
  flexGrow: 1,
510719
510769
  flexShrink: 1,
510720
510770
  minHeight: 0,
510721
510771
  overflow: "hidden",
510722
510772
  children: [
510723
- t17,
510724
- t18
510773
+ t18,
510774
+ t19
510725
510775
  ]
510726
510776
  }, undefined, true, undefined, this);
510727
- $5[83] = t17;
510728
- $5[84] = t18;
510729
- $5[85] = t19;
510777
+ $5[87] = t18;
510778
+ $5[88] = t19;
510779
+ $5[89] = t20;
510730
510780
  } else {
510731
- t19 = $5[85];
510781
+ t20 = $5[89];
510732
510782
  }
510733
- const t20 = t2.textFaint;
510734
- let t21;
510735
- if ($5[86] !== innerW) {
510736
- t21 = "\u2500".repeat(innerW - 2);
510737
- $5[86] = innerW;
510738
- $5[87] = t21;
510783
+ const t21 = t2.textFaint;
510784
+ let t222;
510785
+ if ($5[90] !== innerW) {
510786
+ t222 = "\u2500".repeat(innerW - 2);
510787
+ $5[90] = innerW;
510788
+ $5[91] = t222;
510739
510789
  } else {
510740
- t21 = $5[87];
510790
+ t222 = $5[91];
510741
510791
  }
510742
- let t222;
510743
- if ($5[88] !== t2.textFaint || $5[89] !== t21) {
510744
- t222 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("text", {
510792
+ let t23;
510793
+ if ($5[92] !== t2.textFaint || $5[93] !== t222) {
510794
+ t23 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("text", {
510745
510795
  bg: POPUP_BG,
510746
- fg: t20,
510747
- children: t21
510796
+ fg: t21,
510797
+ children: t222
510748
510798
  }, undefined, false, undefined, this);
510749
- $5[88] = t2.textFaint;
510750
- $5[89] = t21;
510751
- $5[90] = t222;
510799
+ $5[92] = t2.textFaint;
510800
+ $5[93] = t222;
510801
+ $5[94] = t23;
510752
510802
  } else {
510753
- t222 = $5[90];
510803
+ t23 = $5[94];
510754
510804
  }
510755
- let t23;
510756
- if ($5[91] !== innerW || $5[92] !== t222) {
510757
- t23 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(PopupRow, {
510805
+ let t24;
510806
+ if ($5[95] !== innerW || $5[96] !== t23) {
510807
+ t24 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(PopupRow, {
510758
510808
  w: innerW,
510759
- children: t222
510809
+ children: t23
510760
510810
  }, undefined, false, undefined, this);
510761
- $5[91] = innerW;
510762
- $5[92] = t222;
510763
- $5[93] = t23;
510811
+ $5[95] = innerW;
510812
+ $5[96] = t23;
510813
+ $5[97] = t24;
510764
510814
  } else {
510765
- t23 = $5[93];
510815
+ t24 = $5[97];
510766
510816
  }
510767
- let t24;
510768
- if ($5[94] !== t2.textMuted) {
510769
- t24 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("text", {
510817
+ let t25;
510818
+ if ($5[98] !== t2.textMuted) {
510819
+ t25 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("text", {
510770
510820
  bg: POPUP_BG,
510771
510821
  fg: t2.textMuted,
510772
510822
  children: "Scope: "
510773
510823
  }, undefined, false, undefined, this);
510774
- $5[94] = t2.textMuted;
510775
- $5[95] = t24;
510824
+ $5[98] = t2.textMuted;
510825
+ $5[99] = t25;
510776
510826
  } else {
510777
- t24 = $5[95];
510827
+ t25 = $5[99];
510778
510828
  }
510779
- let t25;
510780
- if ($5[96] !== scope || $5[97] !== t2.brandAlt || $5[98] !== t2.textDim) {
510781
- t25 = CONFIG_SCOPES.map((s2) => /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("text", {
510829
+ let t26;
510830
+ if ($5[100] !== scope || $5[101] !== t2.brandAlt || $5[102] !== t2.textDim) {
510831
+ t26 = CONFIG_SCOPES.map((s2) => /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("text", {
510782
510832
  bg: POPUP_BG,
510783
510833
  fg: s2 === scope ? t2.brandAlt : t2.textDim,
510784
510834
  attributes: s2 === scope ? TextAttributes.BOLD : undefined,
@@ -510787,55 +510837,55 @@ function ProviderSettings(t0) {
510787
510837
  " "
510788
510838
  ]
510789
510839
  }, s2, true, undefined, this));
510790
- $5[96] = scope;
510791
- $5[97] = t2.brandAlt;
510792
- $5[98] = t2.textDim;
510793
- $5[99] = t25;
510840
+ $5[100] = scope;
510841
+ $5[101] = t2.brandAlt;
510842
+ $5[102] = t2.textDim;
510843
+ $5[103] = t26;
510794
510844
  } else {
510795
- t25 = $5[99];
510845
+ t26 = $5[103];
510796
510846
  }
510797
- let t26;
510798
- if ($5[100] !== innerW || $5[101] !== t24 || $5[102] !== t25) {
510799
- t26 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(PopupRow, {
510847
+ let t27;
510848
+ if ($5[104] !== innerW || $5[105] !== t25 || $5[106] !== t26) {
510849
+ t27 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(PopupRow, {
510800
510850
  w: innerW,
510801
510851
  children: [
510802
- t24,
510803
- t25
510852
+ t25,
510853
+ t26
510804
510854
  ]
510805
510855
  }, undefined, true, undefined, this);
510806
- $5[100] = innerW;
510807
- $5[101] = t24;
510808
- $5[102] = t25;
510809
- $5[103] = t26;
510856
+ $5[104] = innerW;
510857
+ $5[105] = t25;
510858
+ $5[106] = t26;
510859
+ $5[107] = t27;
510810
510860
  } else {
510811
- t26 = $5[103];
510861
+ t27 = $5[107];
510812
510862
  }
510813
- let t27;
510814
- if ($5[104] !== popupWidth || $5[105] !== t12 || $5[106] !== t16 || $5[107] !== t19 || $5[108] !== t23 || $5[109] !== t26) {
510815
- t27 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(Popup, {
510863
+ let t28;
510864
+ if ($5[108] !== popupWidth || $5[109] !== t13 || $5[110] !== t17 || $5[111] !== t20 || $5[112] !== t24 || $5[113] !== t27) {
510865
+ t28 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(Popup, {
510816
510866
  width: popupWidth,
510817
510867
  title: "Provider Options",
510818
- icon: t9,
510819
- footer: t10,
510868
+ icon: t10,
510869
+ footer: t11,
510820
510870
  children: [
510821
- t12,
510822
- t16,
510823
- t19,
510824
- t23,
510825
- t26
510871
+ t13,
510872
+ t17,
510873
+ t20,
510874
+ t24,
510875
+ t27
510826
510876
  ]
510827
510877
  }, undefined, true, undefined, this);
510828
- $5[104] = popupWidth;
510829
- $5[105] = t12;
510830
- $5[106] = t16;
510831
- $5[107] = t19;
510832
- $5[108] = t23;
510833
- $5[109] = t26;
510834
- $5[110] = t27;
510878
+ $5[108] = popupWidth;
510879
+ $5[109] = t13;
510880
+ $5[110] = t17;
510881
+ $5[111] = t20;
510882
+ $5[112] = t24;
510883
+ $5[113] = t27;
510884
+ $5[114] = t28;
510835
510885
  } else {
510836
- t27 = $5[110];
510886
+ t28 = $5[114];
510837
510887
  }
510838
- return t27;
510888
+ return t28;
510839
510889
  }
510840
510890
  var import_compiler_runtime67, import_react117, MAX_POPUP_WIDTH11 = 88, CHROME_ROWS17 = 7, TABS3, TAB_LABELS2, TAB_ICONS, CLAUDE_ITEMS, OPENAI_ITEMS, GENERAL_ITEMS, TAB_ITEMS, DEFAULTS;
510841
510891
  var init_ProviderSettings = __esm(async () => {
@@ -510873,12 +510923,17 @@ var init_ProviderSettings = __esm(async () => {
510873
510923
  desc: "Token budget for enabled thinking mode",
510874
510924
  type: "budget",
510875
510925
  options: ["1024", "2048", "5000", "10000", "20000"]
510926
+ }, {
510927
+ key: "clearThinking",
510928
+ label: "Preserve Thinking",
510929
+ desc: "Keep all thinking blocks across turns for better cache hits. Off = Anthropic default (only last turn kept). Requires thinking enabled.",
510930
+ type: "toggle"
510876
510931
  }, {
510877
510932
  key: "effort",
510878
510933
  label: "Effort",
510879
510934
  desc: "Reasoning depth \u2014 affects thinking, text, and tool calls",
510880
510935
  type: "cycle",
510881
- options: ["off", "low", "medium", "high", "max"]
510936
+ options: ["off", "low", "medium", "high", "xhigh", "max"]
510882
510937
  }, {
510883
510938
  key: "speed",
510884
510939
  label: "Speed",
@@ -510920,11 +510975,6 @@ var init_ProviderSettings = __esm(async () => {
510920
510975
  label: "Clear Tool Uses",
510921
510976
  desc: "Server-side \u2014 clear old tool results at 65% context. \u26A0\uFE0F Busts prompt cache when triggered",
510922
510977
  type: "toggle"
510923
- }, {
510924
- key: "clearThinking",
510925
- label: "Clear Thinking",
510926
- desc: "Server-side \u2014 preserve all thinking blocks (maximizes cache hits)",
510927
- type: "toggle"
510928
510978
  }];
510929
510979
  OPENAI_ITEMS = [{
510930
510980
  key: "openaiReasoningEffort",
@@ -514336,6 +514386,190 @@ function ShutdownSplash(t0) {
514336
514386
  function _temp89(t2) {
514337
514387
  return t2 + 1;
514338
514388
  }
514389
+ function CheckpointLegend(t0) {
514390
+ const $5 = import_compiler_runtime71.c(35);
514391
+ const {
514392
+ tabId,
514393
+ fallbackSpacer
514394
+ } = t0;
514395
+ const t2 = useTheme();
514396
+ let t1;
514397
+ if ($5[0] !== tabId) {
514398
+ t1 = (s2) => s2.tabs[tabId]?.checkpoints?.length ?? 0;
514399
+ $5[0] = tabId;
514400
+ $5[1] = t1;
514401
+ } else {
514402
+ t1 = $5[1];
514403
+ }
514404
+ const count = useCheckpointStore(t1);
514405
+ if (count <= 1) {
514406
+ let t23;
514407
+ if ($5[2] !== fallbackSpacer) {
514408
+ t23 = fallbackSpacer ? /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("box", {
514409
+ height: 1,
514410
+ flexShrink: 0
514411
+ }, undefined, false, undefined, this) : null;
514412
+ $5[2] = fallbackSpacer;
514413
+ $5[3] = t23;
514414
+ } else {
514415
+ t23 = $5[3];
514416
+ }
514417
+ return t23;
514418
+ }
514419
+ let t22;
514420
+ if ($5[4] !== t2.brand) {
514421
+ t22 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
514422
+ fg: t2.brand,
514423
+ children: "\u25C6"
514424
+ }, undefined, false, undefined, this);
514425
+ $5[4] = t2.brand;
514426
+ $5[5] = t22;
514427
+ } else {
514428
+ t22 = $5[5];
514429
+ }
514430
+ let t3;
514431
+ if ($5[6] !== t2.textFaint) {
514432
+ t3 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
514433
+ fg: t2.textFaint,
514434
+ children: " \u2502 "
514435
+ }, undefined, false, undefined, this);
514436
+ $5[6] = t2.textFaint;
514437
+ $5[7] = t3;
514438
+ } else {
514439
+ t3 = $5[7];
514440
+ }
514441
+ let t4;
514442
+ if ($5[8] !== t2.warning) {
514443
+ t4 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
514444
+ fg: t2.warning,
514445
+ children: "\u25CF"
514446
+ }, undefined, false, undefined, this);
514447
+ $5[8] = t2.warning;
514448
+ $5[9] = t4;
514449
+ } else {
514450
+ t4 = $5[9];
514451
+ }
514452
+ let t5;
514453
+ if ($5[10] !== t2.textFaint) {
514454
+ t5 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
514455
+ fg: t2.textFaint,
514456
+ children: " \u2502 "
514457
+ }, undefined, false, undefined, this);
514458
+ $5[10] = t2.textFaint;
514459
+ $5[11] = t5;
514460
+ } else {
514461
+ t5 = $5[11];
514462
+ }
514463
+ let t6;
514464
+ if ($5[12] !== t2.textMuted) {
514465
+ t6 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
514466
+ fg: t2.textMuted,
514467
+ children: "\u25CF"
514468
+ }, undefined, false, undefined, this);
514469
+ $5[12] = t2.textMuted;
514470
+ $5[13] = t6;
514471
+ } else {
514472
+ t6 = $5[13];
514473
+ }
514474
+ let t7;
514475
+ let t8;
514476
+ if ($5[14] !== t2.textFaint) {
514477
+ t7 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
514478
+ fg: t2.textFaint,
514479
+ children: " \u2502 "
514480
+ }, undefined, false, undefined, this);
514481
+ t8 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
514482
+ fg: t2.textFaint,
514483
+ children: "\u25CB"
514484
+ }, undefined, false, undefined, this);
514485
+ $5[14] = t2.textFaint;
514486
+ $5[15] = t7;
514487
+ $5[16] = t8;
514488
+ } else {
514489
+ t7 = $5[15];
514490
+ t8 = $5[16];
514491
+ }
514492
+ let t9;
514493
+ if ($5[17] !== t2.textFaint) {
514494
+ t9 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
514495
+ fg: t2.textFaint,
514496
+ children: " \u2502 "
514497
+ }, undefined, false, undefined, this);
514498
+ $5[17] = t2.textFaint;
514499
+ $5[18] = t9;
514500
+ } else {
514501
+ t9 = $5[18];
514502
+ }
514503
+ let t10;
514504
+ if ($5[19] !== t2.textMuted) {
514505
+ t10 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
514506
+ fg: t2.textMuted,
514507
+ children: "^B"
514508
+ }, undefined, false, undefined, this);
514509
+ $5[19] = t2.textMuted;
514510
+ $5[20] = t10;
514511
+ } else {
514512
+ t10 = $5[20];
514513
+ }
514514
+ let t11;
514515
+ if ($5[21] !== t2.textMuted) {
514516
+ t11 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
514517
+ fg: t2.textMuted,
514518
+ children: "^F"
514519
+ }, undefined, false, undefined, this);
514520
+ $5[21] = t2.textMuted;
514521
+ $5[22] = t11;
514522
+ } else {
514523
+ t11 = $5[22];
514524
+ }
514525
+ let t12;
514526
+ if ($5[23] !== t2.textDim || $5[24] !== t10 || $5[25] !== t11 || $5[26] !== t22 || $5[27] !== t3 || $5[28] !== t4 || $5[29] !== t5 || $5[30] !== t6 || $5[31] !== t7 || $5[32] !== t8 || $5[33] !== t9) {
514527
+ t12 = /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("box", {
514528
+ flexShrink: 0,
514529
+ height: 1,
514530
+ paddingX: 1,
514531
+ flexDirection: "row",
514532
+ justifyContent: "flex-end",
514533
+ flexGrow: 1,
514534
+ children: /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("text", {
514535
+ fg: t2.textDim,
514536
+ children: [
514537
+ t22,
514538
+ " latest",
514539
+ t3,
514540
+ t4,
514541
+ " viewing",
514542
+ t5,
514543
+ t6,
514544
+ " edits",
514545
+ t7,
514546
+ t8,
514547
+ " read",
514548
+ t9,
514549
+ t10,
514550
+ "/",
514551
+ t11,
514552
+ " navigate"
514553
+ ]
514554
+ }, undefined, true, undefined, this)
514555
+ }, undefined, false, undefined, this);
514556
+ $5[23] = t2.textDim;
514557
+ $5[24] = t10;
514558
+ $5[25] = t11;
514559
+ $5[26] = t22;
514560
+ $5[27] = t3;
514561
+ $5[28] = t4;
514562
+ $5[29] = t5;
514563
+ $5[30] = t6;
514564
+ $5[31] = t7;
514565
+ $5[32] = t8;
514566
+ $5[33] = t9;
514567
+ $5[34] = t12;
514568
+ } else {
514569
+ t12 = $5[34];
514570
+ }
514571
+ return t12;
514572
+ }
514339
514573
  function nativeCopy(text3) {
514340
514574
  const cmd = process.platform === "darwin" ? "pbcopy" : "xclip";
514341
514575
  const args2 = process.platform === "darwin" ? [] : ["-selection", "clipboard"];
@@ -515204,23 +515438,32 @@ function App({
515204
515438
  tabMgr.tabCount > 1 ? /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("box", {
515205
515439
  flexShrink: 0,
515206
515440
  marginTop: 1,
515207
- children: /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(TabBar, {
515208
- tabs: tabMgr.tabs,
515209
- activeTabId: tabMgr.activeTabId,
515210
- onSwitch: tabMgr.switchTab,
515211
- getActivity: tabMgr.getTabActivity,
515212
- getMode: (id) => id === tabMgr.activeTabId ? forgeMode : tabMgr.getChat(id)?.forgeMode ?? "default",
515213
- getModelLabel: (id_0) => {
515214
- const model_0 = id_0 === tabMgr.activeTabId ? activeModelForHeader : tabMgr.getChat(id_0)?.activeModel ?? null;
515215
- if (!model_0 || model_0 === "none" || model_0 === effectiveConfig.defaultModel)
515216
- return null;
515217
- return getShortModelLabel(model_0);
515218
- }
515219
- }, undefined, false, undefined, this)
515220
- }, "tab-bar", false, undefined, this) : !editorVisible ? /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("box", {
515221
- height: 1,
515222
- flexShrink: 0
515223
- }, "tab-spacer", false, undefined, this) : null,
515441
+ flexDirection: "row",
515442
+ flexWrap: "wrap",
515443
+ children: [
515444
+ /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(TabBar, {
515445
+ tabs: tabMgr.tabs,
515446
+ activeTabId: tabMgr.activeTabId,
515447
+ onSwitch: tabMgr.switchTab,
515448
+ getActivity: tabMgr.getTabActivity,
515449
+ getMode: (id) => id === tabMgr.activeTabId ? forgeMode : tabMgr.getChat(id)?.forgeMode ?? "default",
515450
+ getModelLabel: (id_0) => {
515451
+ const model_0 = id_0 === tabMgr.activeTabId ? activeModelForHeader : tabMgr.getChat(id_0)?.activeModel ?? null;
515452
+ if (!model_0 || model_0 === "none" || model_0 === effectiveConfig.defaultModel)
515453
+ return null;
515454
+ return getShortModelLabel(model_0);
515455
+ }
515456
+ }, undefined, false, undefined, this),
515457
+ /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(CheckpointLegend, {
515458
+ tabId: tabMgr.activeTabId
515459
+ }, undefined, false, undefined, this)
515460
+ ]
515461
+ }, "tab-bar", true, undefined, this) : !editorVisible ? /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(CheckpointLegend, {
515462
+ tabId: tabMgr.activeTabId,
515463
+ fallbackSpacer: true
515464
+ }, undefined, false, undefined, this) : /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(CheckpointLegend, {
515465
+ tabId: tabMgr.activeTabId
515466
+ }, undefined, false, undefined, this),
515224
515467
  /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("box", {
515225
515468
  flexDirection: "row",
515226
515469
  flexGrow: 1,