fluxflow-cli 2.10.3 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/fluxflow.js +371 -55
  2. package/package.json +2 -2
package/dist/fluxflow.js CHANGED
@@ -1993,7 +1993,7 @@ var init_StatusBar = __esm({
1993
1993
  },
1994
1994
  /* @__PURE__ */ React4.createElement(Box4, null, /* @__PURE__ */ React4.createElement(Box4, { marginRight: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "white", bold: true }, modeIcon, " ", mode.toUpperCase())), /* @__PURE__ */ React4.createElement(Text4, { color: "gray", dimColor: true }, "\u2503 "), /* @__PURE__ */ React4.createElement(Box4, { marginX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "white", bold: true }, thinkingLevel.toUpperCase())), /* @__PURE__ */ React4.createElement(Text4, { color: "gray", dimColor: true }, "\u2503 "), /* @__PURE__ */ React4.createElement(Box4, { marginX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "gray" }, "MEM: "), /* @__PURE__ */ React4.createElement(Text4, { color: "white", bold: true }, isMemoryEnabled ? "ON" : "OFF"))),
1995
1995
  /* @__PURE__ */ React4.createElement(Box4, { flexGrow: 1, justifyContent: "center", paddingX: 2 }, /* @__PURE__ */ React4.createElement(Text4, { color: "white", italic: true }, " ", truncatePath(process.cwd(), 35))),
1996
- /* @__PURE__ */ React4.createElement(Box4, null, /* @__PURE__ */ React4.createElement(Text4, { color: "gray", dimColor: true }, "\u2503 "), /* @__PURE__ */ React4.createElement(Box4, { marginX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "white" }, " ", formatTokens(tokensTotal), " ", /* @__PURE__ */ React4.createElement(Text4, { dimColor: true }, (tokens / maxLimit * 100).toFixed(0), "%"))), /* @__PURE__ */ React4.createElement(Text4, { color: "gray", dimColor: true }, "\u2503 "), /* @__PURE__ */ React4.createElement(Box4, { marginLeft: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "gray", italic: true }, " ", chatId), (apiTier === "Custom" || apiTier === "Paid") && /* @__PURE__ */ React4.createElement(Text4, { color: "gray", dimColor: true }, " | ", /* @__PURE__ */ React4.createElement(Text4, { color: "gray", bold: true }, "PAID"))))
1996
+ /* @__PURE__ */ React4.createElement(Box4, null, /* @__PURE__ */ React4.createElement(Text4, { color: "gray", dimColor: true }, "\u2503 "), /* @__PURE__ */ React4.createElement(Box4, { marginX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "white" }, " ", formatTokens(tokensTotal), " ", /* @__PURE__ */ React4.createElement(Text4, { dimColor: true }, (tokens / maxLimit * 100).toFixed(0), "%"))), /* @__PURE__ */ React4.createElement(Text4, { color: "gray", dimColor: true }, "\u2503 "), /* @__PURE__ */ React4.createElement(Box4, { marginLeft: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "gray", italic: true }, " ", chatId), (apiTier === "Custom" || apiTier === "Paid") && /* @__PURE__ */ React4.createElement(Text4, { color: "white" }, " | ", /* @__PURE__ */ React4.createElement(Text4, { color: "gray", bold: true }, "CUSTOM"))))
1997
1997
  );
1998
1998
  });
1999
1999
  StatusBar_default = StatusBar;
@@ -2009,6 +2009,7 @@ function CommandMenu({ title, subtitle, items, onSelect }) {
2009
2009
  Box5,
2010
2010
  {
2011
2011
  flexDirection: "column",
2012
+ borderStyle: "round",
2012
2013
  borderColor: "white",
2013
2014
  padding: 0,
2014
2015
  marginTop: 0,
@@ -2934,7 +2935,7 @@ function SettingsMenu({
2934
2935
  case "other":
2935
2936
  return [
2936
2937
  { label: "Current Provider", value: "aiProvider", status: aiProvider },
2937
- { label: "API Tier", value: "apiTier", status: apiTier },
2938
+ { label: "API Tier", value: "apiTier", status: apiTier === "Free" ? "Provider Limits" : "Custom Budget" },
2938
2939
  { label: "Download Language Parsers", value: "parserDownload", status: "ACTION" }
2939
2940
  ];
2940
2941
  default:
@@ -3951,7 +3952,7 @@ var init_history = __esm({
3951
3952
  import fs8 from "fs-extra";
3952
3953
  import path7 from "path";
3953
3954
  import os3 from "os";
3954
- var getLocalBackupPath, BACKUP_FILE, generateSaveId, cachedUsage, writeTimeout, lastWriteTime, isDirty, defaultStats, purgeOldHistory, loadUsageFromFile, flushUsage, queueFlush, initUsage, forceFlushUsage, getDailyUsage, getMonthlyUsage, incrementUsage, addToUsage, checkQuota, getImageQuotaBuckets, getImageQuotaLimit, checkImageQuota, getImageQuotaStats, recordImageGeneration;
3955
+ var getLocalBackupPath, BACKUP_FILE, generateSaveId, cachedUsage, writeTimeout, lastWriteTime, isDirty, defaultStats, purgeOldHistory, loadUsageFromFile, flushUsage, queueFlush, initUsage, forceFlushUsage, getDailyUsage, getMonthlyUsage, incrementUsage, addToUsage, getCustomPeriodUsage, checkQuota, getImageQuotaBuckets, getImageQuotaLimit, checkImageQuota, getImageQuotaStats, recordImageGeneration;
3955
3956
  var init_usage = __esm({
3956
3957
  "src/utils/usage.js"() {
3957
3958
  init_paths();
@@ -4325,20 +4326,104 @@ var init_usage = __esm({
4325
4326
  }
4326
4327
  queueFlush();
4327
4328
  };
4329
+ getCustomPeriodUsage = async (resetDay = 1) => {
4330
+ const today = /* @__PURE__ */ new Date();
4331
+ const todayStr = today.toISOString().split("T")[0];
4332
+ if (!cachedUsage) {
4333
+ cachedUsage = await loadUsageFromFile();
4334
+ }
4335
+ if (cachedUsage.date !== todayStr) {
4336
+ await getDailyUsage();
4337
+ }
4338
+ let startYear = today.getFullYear();
4339
+ let startMonth = today.getMonth();
4340
+ const todayDay = today.getDate();
4341
+ if (todayDay < resetDay) {
4342
+ startMonth -= 1;
4343
+ if (startMonth < 0) {
4344
+ startMonth = 11;
4345
+ startYear -= 1;
4346
+ }
4347
+ }
4348
+ const startDate = new Date(startYear, startMonth, resetDay);
4349
+ const startDateStr = startDate.toISOString().split("T")[0];
4350
+ const history = cachedUsage.history || {};
4351
+ const todayStats = cachedUsage.stats || { ...defaultStats };
4352
+ const summed = { ...defaultStats };
4353
+ summed.imageCalls = [];
4354
+ summed.models = {};
4355
+ const addStats = (target, source) => {
4356
+ for (const key in target) {
4357
+ if (key === "imageCalls") {
4358
+ target.imageCalls = [...target.imageCalls || [], ...source.imageCalls || []];
4359
+ } else if (key === "models") {
4360
+ const srcModels = source.models || {};
4361
+ for (const provider in srcModels) {
4362
+ if (!target.models[provider]) {
4363
+ target.models[provider] = {};
4364
+ }
4365
+ for (const model in srcModels[provider]) {
4366
+ if (!target.models[provider][model]) {
4367
+ target.models[provider][model] = {
4368
+ tokens: 0,
4369
+ cachedTokens: 0,
4370
+ candidateTokens: 0
4371
+ };
4372
+ }
4373
+ const tM = target.models[provider][model];
4374
+ const sM = srcModels[provider][model];
4375
+ tM.tokens += sM.tokens || 0;
4376
+ tM.cachedTokens += sM.cachedTokens || 0;
4377
+ tM.candidateTokens += sM.candidateTokens || 0;
4378
+ }
4379
+ }
4380
+ } else if (typeof target[key] === "number") {
4381
+ target[key] += source[key] || 0;
4382
+ }
4383
+ }
4384
+ };
4385
+ addStats(summed, todayStats);
4386
+ for (const dateKey in history) {
4387
+ if (dateKey >= startDateStr && dateKey < todayStr) {
4388
+ addStats(summed, history[dateKey]);
4389
+ }
4390
+ }
4391
+ return summed;
4392
+ };
4328
4393
  checkQuota = async (key, settings) => {
4329
- const usage = await getDailyUsage();
4330
4394
  const tier = settings.apiTier || "Free";
4331
4395
  const quotas = settings.quotas || {};
4332
4396
  if (tier === "Free") {
4333
4397
  if (key === "agent" || key === "background") {
4334
- return usage.agent + usage.background < 999999;
4398
+ const daily = await getDailyUsage();
4399
+ return daily.agent + daily.background < 999999;
4335
4400
  }
4336
4401
  if (key === "search") return true;
4337
4402
  }
4338
4403
  if (tier === "Paid" || tier === "Custom") {
4339
- if (key === "agent") return usage.agent < (quotas.agentLimit || 999999);
4340
- if (key === "background") return usage.background < (quotas.backgroundLimit || 999999);
4341
- if (key === "search") return usage.search < (quotas.searchLimit || 100);
4404
+ if (key === "agent") {
4405
+ const reqLimit = quotas.agentLimit || 99999999;
4406
+ const tokenLimit = quotas.tokenLimit || 99999999999999;
4407
+ const monthlyTokenLimit = quotas.monthlyTokenLimit || 99999999999999;
4408
+ const dailyUsage = await getDailyUsage();
4409
+ const dailyOk = dailyUsage.agent < reqLimit && (dailyUsage.tokens || 0) < tokenLimit;
4410
+ if (!dailyOk) return false;
4411
+ let monthlyUsage;
4412
+ if (quotas.resetMode === "Custom") {
4413
+ monthlyUsage = await getCustomPeriodUsage(quotas.resetDay || 1);
4414
+ } else {
4415
+ monthlyUsage = await getMonthlyUsage();
4416
+ }
4417
+ return (monthlyUsage.tokens || 0) < monthlyTokenLimit;
4418
+ }
4419
+ if (key === "background") {
4420
+ const dailyUsage = await getDailyUsage();
4421
+ return dailyUsage.background < (quotas.backgroundLimit || 999999);
4422
+ }
4423
+ if (key === "search") {
4424
+ const dailyUsage = await getDailyUsage();
4425
+ return dailyUsage.search < (quotas.searchLimit || 100);
4426
+ }
4342
4427
  }
4343
4428
  return true;
4344
4429
  };
@@ -7153,16 +7238,23 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
7153
7238
  }
7154
7239
  }
7155
7240
  break;
7156
- } catch (janitorErr) {
7241
+ } catch (err) {
7157
7242
  attempts++;
7158
7243
  const date = (/* @__PURE__ */ new Date()).toLocaleString();
7159
7244
  if (process.stdout.isTTY) {
7160
7245
  process.stdout.write(`\x1B]0;Finalizing Error\x07`);
7161
7246
  }
7247
+ const errLog = err instanceof Error ? (() => {
7248
+ try {
7249
+ return JSON.parse(JSON.parse(err.message).error.message).error.message;
7250
+ } catch {
7251
+ return String(err);
7252
+ }
7253
+ })() : String(err);
7162
7254
  await new Promise((resolve) => setTimeout(resolve, 1e3));
7163
7255
  const janitorErrDir = path19.join(LOGS_DIR, "janitor");
7164
7256
  if (!fs20.existsSync(janitorErrDir)) fs20.mkdirSync(janitorErrDir, { recursive: true });
7165
- fs20.appendFileSync(path19.join(janitorErrDir, "error.log"), `ERROR [Attempt ${attempts}/${MAX_JANITOR_RETRIES + 1}] [${date}]: ${String(janitorErr)}
7257
+ fs20.appendFileSync(path19.join(janitorErrDir, "error.log"), `ERROR [Attempt ${attempts}/${MAX_JANITOR_RETRIES + 1}] [${date}]: ${errLog}
7166
7258
 
7167
7259
  `);
7168
7260
  if (attempts > MAX_JANITOR_RETRIES) break;
@@ -7174,7 +7266,6 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
7174
7266
  const janitorErrDir = path19.join(LOGS_DIR, "janitor");
7175
7267
  fs20.appendFileSync(path19.join(janitorErrDir, "error.log"), `-----------------------------------------------------------------------------
7176
7268
 
7177
-
7178
7269
  `);
7179
7270
  if (attempts >= MAX_JANITOR_RETRIES) {
7180
7271
  if (process.stdout.isTTY) {
@@ -7531,11 +7622,19 @@ ${newMemoryListStr}
7531
7622
  }
7532
7623
  }
7533
7624
  } catch (err) {
7625
+ const errLog = err instanceof Error ? (() => {
7626
+ try {
7627
+ return JSON.parse(JSON.parse(err.message).error.message).error.message;
7628
+ } catch {
7629
+ return String(err);
7630
+ }
7631
+ })() : String(err);
7632
+ ;
7534
7633
  const janitorLogDir = path19.join(LOGS_DIR, "janitor");
7535
7634
  if (!fs20.existsSync(janitorLogDir)) fs20.mkdirSync(janitorLogDir, { recursive: true });
7536
7635
  fs20.appendFileSync(
7537
7636
  path19.join(janitorLogDir, "error.log"),
7538
- `[${(/* @__PURE__ */ new Date()).toLocaleString()}] Past memory batch consolidation error: ${err.message}
7637
+ `[${(/* @__PURE__ */ new Date()).toLocaleString()}] Past memory batch consolidation error: ${errLog}
7539
7638
  `
7540
7639
  );
7541
7640
  }
@@ -8020,19 +8119,106 @@ Cursor Line: ${ideCtx.cursor_line}
8020
8119
  `;
8021
8120
  if (ideCtx.manual_edits) {
8022
8121
  let edits = ideCtx.manual_edits;
8023
- const CHAR_LIMIT = 4 * 512;
8024
- const LINE_LIMIT = 50;
8025
8122
  const lines = edits.split("\n");
8026
- if (lines.length > LINE_LIMIT) {
8027
- edits = lines.slice(0, LINE_LIMIT).join("\n") + `
8028
- ... (${lines.length - LINE_LIMIT} more lines truncated)`;
8123
+ const files = [];
8124
+ let currentFile = null;
8125
+ for (const line of lines) {
8126
+ if (!line.trim()) continue;
8127
+ if (line.startsWith(" Line ")) {
8128
+ if (currentFile) {
8129
+ currentFile.edits.push(line);
8130
+ }
8131
+ } else {
8132
+ const filePath = line.endsWith(":") ? line.slice(0, -1) : line;
8133
+ currentFile = { path: filePath, edits: [] };
8134
+ files.push(currentFile);
8135
+ }
8136
+ }
8137
+ for (const file of files) {
8138
+ if (file.edits.length > 80) {
8139
+ file.edits = file.edits.slice(-80);
8140
+ }
8141
+ file.originalEditsCount = file.edits.length;
8142
+ }
8143
+ const getSumForLimit = (limit, activeFiles2) => {
8144
+ return activeFiles2.reduce((sum, f) => {
8145
+ const isFocused = ideCtx.file_focused && (f.path === ideCtx.file_focused || path19.resolve(process.cwd(), f.path) === path19.resolve(ideCtx.file_focused));
8146
+ const fileLimit = isFocused ? Math.ceil(limit * 1.2) : limit;
8147
+ return sum + Math.min(f.edits.length, fileLimit);
8148
+ }, 0);
8149
+ };
8150
+ let chosenLimit = 80;
8151
+ if (getSumForLimit(80, files) > 300) {
8152
+ let found = false;
8153
+ for (let L = 80; L >= 10; L--) {
8154
+ if (getSumForLimit(L, files) <= 300) {
8155
+ chosenLimit = L;
8156
+ found = true;
8157
+ break;
8158
+ }
8159
+ }
8160
+ if (!found) {
8161
+ chosenLimit = 10;
8162
+ }
8029
8163
  }
8030
- if (edits.length > CHAR_LIMIT) {
8031
- edits = edits.substring(0, CHAR_LIMIT) + `
8032
- ... (Character limit reached, truncated)`;
8164
+ let activeFiles = [...files];
8165
+ if (chosenLimit === 10 && getSumForLimit(10, activeFiles) > 500) {
8166
+ while (activeFiles.length > 0 && getSumForLimit(10, activeFiles) > 500) {
8167
+ let minIndex = 0;
8168
+ let minVal = activeFiles[0].originalEditsCount;
8169
+ for (let i = 1; i < activeFiles.length; i++) {
8170
+ if (activeFiles[i].originalEditsCount < minVal) {
8171
+ minVal = activeFiles[i].originalEditsCount;
8172
+ minIndex = i;
8173
+ }
8174
+ }
8175
+ activeFiles.splice(minIndex, 1);
8176
+ }
8177
+ }
8178
+ for (const file of activeFiles) {
8179
+ const isFocused = ideCtx.file_focused && (file.path === ideCtx.file_focused || path19.resolve(process.cwd(), file.path) === path19.resolve(ideCtx.file_focused));
8180
+ const fileLimit = isFocused ? Math.ceil(chosenLimit * 1.2) : chosenLimit;
8181
+ if (file.edits.length > fileLimit) {
8182
+ file.edits = file.edits.slice(-fileLimit);
8183
+ }
8184
+ }
8185
+ for (const file of activeFiles) {
8186
+ let fileString = `${file.path}:
8187
+ ${file.edits.join("\n")}`;
8188
+ while (file.edits.length > 0 && fileString.length > 4 * 768) {
8189
+ file.edits.shift();
8190
+ fileString = `${file.path}:
8191
+ ${file.edits.join("\n")}`;
8192
+ }
8193
+ if (fileString.length > 4 * 768) {
8194
+ file.stringRepresentation = "... " + fileString.slice(-(4 * 768 - 4));
8195
+ } else {
8196
+ file.stringRepresentation = fileString;
8197
+ }
8198
+ }
8199
+ let finalEdits = activeFiles.map((f) => f.stringRepresentation).join("\n");
8200
+ while (activeFiles.length > 0 && finalEdits.length > 4 * 2048) {
8201
+ if (activeFiles[0].edits.length > 0) {
8202
+ activeFiles[0].edits.shift();
8203
+ } else {
8204
+ activeFiles.shift();
8205
+ }
8206
+ for (const file of activeFiles) {
8207
+ let fileString = `${file.path}:
8208
+ ${file.edits.join("\n")}`;
8209
+ if (fileString.length > 4 * 768) {
8210
+ file.stringRepresentation = "... " + fileString.slice(-(4 * 768 - 4));
8211
+ } else {
8212
+ file.stringRepresentation = fileString;
8213
+ }
8214
+ }
8215
+ finalEdits = activeFiles.map((f) => f.stringRepresentation).join("\n");
8216
+ }
8217
+ if (finalEdits.length > 4 * 2048) {
8218
+ finalEdits = "... " + finalEdits.slice(-(4 * 2048 - 4));
8033
8219
  }
8034
8220
  ideBlock += `Recent Manual Edits:
8035
- ${edits}
8221
+ ${finalEdits}
8036
8222
  `;
8037
8223
  }
8038
8224
  if (relOpened.length > 0) ideBlock += `All Opened Editors: ${relOpened.join(", ")}`;
@@ -9471,7 +9657,7 @@ ${boxBottom}` };
9471
9657
  denyMsg = "Permission Denied: Prohibited Command in User Policy";
9472
9658
  }
9473
9659
  if (normToolName === "write_file" || normToolName === "update_file") {
9474
- const action = normToolName === "write_file" ? "WRITE DENIED" : "UPDATE DENIED";
9660
+ const action = normToolName === "write_file" ? "Write Cancelled" : "Edit Denied";
9475
9661
  const deniedLabel = `\u{1F4BE} ${action}: ${parseArgs(toolCall.args).path || "..."}`.toUpperCase();
9476
9662
  let terminalWidth = 115;
9477
9663
  if (process.stdout.isTTY) {
@@ -9617,7 +9803,7 @@ ${boxBottom}` };
9617
9803
  uiTitle = "\u{1F4E5} Added Plan";
9618
9804
  listItems = normalizeList(tasks).map((item) => `\u25CB ${item}`);
9619
9805
  } else if (method === "get") {
9620
- uiTitle = markDone ? "\u{1F4CC} Updated Plan" : "\u{1F4DD} Reviewed Plan";
9806
+ uiTitle = markDone ? "\u{1F504} Updated Plan" : "\u{1F4DD} Reviewed Plan";
9621
9807
  const content = (result || "").split("\n").slice(1).join("\n");
9622
9808
  listItems = content.split("\n").filter((line) => line.trim().startsWith("- [")).map((line) => {
9623
9809
  const trimmed = line.trim();
@@ -9786,8 +9972,14 @@ ${boxBottom}` };
9786
9972
  isDedupeActive = false;
9787
9973
  dedupeBuffer = "";
9788
9974
  }
9789
- const errMsg = err.status || err.error && err.error.message || String(err);
9790
- const errLog = String(err);
9975
+ const errLog = err instanceof Error ? (() => {
9976
+ try {
9977
+ return JSON.parse(JSON.parse(err.message).error.message).error.message;
9978
+ } catch {
9979
+ return String(err);
9980
+ }
9981
+ })() : String(err);
9982
+ ;
9791
9983
  const date = (/* @__PURE__ */ new Date()).toLocaleString();
9792
9984
  const agentErrDir = path19.join(LOGS_DIR, "agent");
9793
9985
  if (!fs20.existsSync(agentErrDir)) fs20.mkdirSync(agentErrDir, { recursive: true });
@@ -9802,6 +9994,8 @@ ${boxBottom}` };
9802
9994
  if (retryCount < MAX_RETRIES - 3) {
9803
9995
  throw err;
9804
9996
  }
9997
+ yield { type: "text", content: errLog };
9998
+ yield { type: "status", content: "Error Occured" };
9805
9999
  }
9806
10000
  if (turnText.trim().length > 0 || inStreamRetryCount > 1) {
9807
10001
  if (inStreamRetryCount <= MAX_RETRIES) {
@@ -9948,11 +10142,18 @@ Error Log can be found in ${path19.join(LOGS_DIR, "agent", "error.log")}`);
9948
10142
  }
9949
10143
  });
9950
10144
  } catch (err) {
9951
- const errorMsg = err instanceof Error ? err.message : String(err);
10145
+ const errLog = err instanceof Error ? (() => {
10146
+ try {
10147
+ return JSON.parse(JSON.parse(err.message).error.message).error.message;
10148
+ } catch {
10149
+ return String(err);
10150
+ }
10151
+ })() : String(err);
9952
10152
  const date = (/* @__PURE__ */ new Date()).toLocaleString();
9953
10153
  const agentErrDir = path19.join(LOGS_DIR, "agent");
10154
+ yield { type: "text", content: `\u274C CRITICAL ERROR: ${errLog}` };
9954
10155
  if (!fs20.existsSync(agentErrDir)) fs20.mkdirSync(agentErrDir, { recursive: true });
9955
- fs20.appendFileSync(path19.join(agentErrDir, "error.log"), `CRITICAL ERROR [${date}]: ${err instanceof Error ? err.stack : err}
10156
+ fs20.appendFileSync(path19.join(agentErrDir, "error.log"), `CRITICAL ERROR [${date}]: ${errLog}
9956
10157
 
9957
10158
  ----------------------------------------------------------------------
9958
10159
 
@@ -9960,7 +10161,7 @@ Error Log can be found in ${path19.join(LOGS_DIR, "agent", "error.log")}`);
9960
10161
  if (typeof flushGoogleBuffer === "function") {
9961
10162
  yield* flushGoogleBuffer();
9962
10163
  }
9963
- yield { type: "tool_result", content: `ERROR: [INTERNAL CRITICAL] ${errorMsg}` };
10164
+ yield { type: "tool_result", content: `ERROR: [INTERNAL CRITICAL] ${errLog}` };
9964
10165
  } finally {
9965
10166
  if (connectionPollInterval) {
9966
10167
  clearInterval(connectionPollInterval);
@@ -10799,6 +11000,7 @@ import path20 from "path";
10799
11000
  import { exec as exec2 } from "child_process";
10800
11001
  import { fileURLToPath } from "url";
10801
11002
  import TextInput4 from "ink-text-input";
11003
+ import SelectInput2 from "ink-select-input";
10802
11004
  import gradient2 from "gradient-string";
10803
11005
  function App({ args = [] }) {
10804
11006
  const [confirmExit, setConfirmExit] = useState11(false);
@@ -11065,7 +11267,7 @@ function App({ args = [] }) {
11065
11267
  };
11066
11268
  const [activeView, setActiveView] = useState11("chat");
11067
11269
  const [apiTier, setApiTier] = useState11("Free");
11068
- const [quotas, setQuotas] = useState11({ agentLimit: 999999, backgroundLimit: 999999, searchLimit: 100, customModelId: "", customLimit: 0 });
11270
+ const [quotas, setQuotas] = useState11({ limitMode: "Daily", agentLimit: 99999999, tokenLimit: 99999999999999, backgroundLimit: 999999, searchLimit: 100, customModelId: "", customLimit: 0 });
11069
11271
  const [inputConfig, setInputConfig] = useState11(null);
11070
11272
  const [systemSettings, setSystemSettings] = useState11({ memory: true, compression: 0, autoExec: false, autoDeleteHistory: "7d", autoUpdate: false, updateManager: "npm", customUpdateCommand: "" });
11071
11273
  const [profileData, setProfileData] = useState11({ name: null, nickname: null, instructions: null });
@@ -11087,6 +11289,7 @@ function App({ args = [] }) {
11087
11289
  const [sessionImageCredits, setSessionImageCredits] = useState11(0);
11088
11290
  const [dailyUsage, setDailyUsage] = useState11(null);
11089
11291
  const [monthlyUsage, setMonthlyUsage] = useState11(null);
11292
+ const [customPeriodUsage, setCustomPeriodUsage] = useState11(null);
11090
11293
  const [statsMode, setStatsMode] = useState11("daily");
11091
11294
  const [chatId, setChatId] = useState11(generateChatId());
11092
11295
  useEffect8(() => {
@@ -11097,6 +11300,19 @@ function App({ args = [] }) {
11097
11300
  });
11098
11301
  }
11099
11302
  }, [sessionTotalTokens, chatId, sessionStats.tokens]);
11303
+ useEffect8(() => {
11304
+ if (activeView === "apiTier") {
11305
+ const load = async () => {
11306
+ const d = await getDailyUsage();
11307
+ setDailyUsage(d);
11308
+ const m = await getMonthlyUsage();
11309
+ setMonthlyUsage(m);
11310
+ const c = await getCustomPeriodUsage(quotas.resetDay || 1);
11311
+ setCustomPeriodUsage(c);
11312
+ };
11313
+ load();
11314
+ }
11315
+ }, [activeView, quotas.resetDay]);
11100
11316
  const [activeCommand, setActiveCommand] = useState11(null);
11101
11317
  const [execOutput, setExecOutput] = useState11("");
11102
11318
  const [isTerminalFocused, setIsTerminalFocused] = useState11(false);
@@ -11608,7 +11824,7 @@ function App({ args = [] }) {
11608
11824
  }
11609
11825
  setShowFullThinking(saved.showFullThinking);
11610
11826
  setApiTier(saved.apiTier || "Free");
11611
- setQuotas(saved.quotas || { agentLimit: 999999, backgroundLimit: 999999, searchLimit: 100, customModelId: "", customLimit: 0 });
11827
+ setQuotas(saved.quotas || { limitMode: "Daily", agentLimit: 99999999, tokenLimit: 99999999999999, backgroundLimit: 999999, searchLimit: 100, customModelId: "", customLimit: 0 });
11612
11828
  const freshSettings = {
11613
11829
  memory: true,
11614
11830
  compression: 0,
@@ -13329,6 +13545,32 @@ Selection: ${val}`,
13329
13545
  useEffect8(() => {
13330
13546
  setSelectedIndex(0);
13331
13547
  }, [suggestions]);
13548
+ const CustomMenuItem = ({ label, isSelected }) => {
13549
+ const isCancel = label === "Cancel" || label === "Back" || label.toLowerCase().includes("exit") || label.toLowerCase().includes("back");
13550
+ return /* @__PURE__ */ React14.createElement(
13551
+ Box14,
13552
+ {
13553
+ marginTop: isCancel ? 1 : 0,
13554
+ backgroundColor: isSelected ? "#2a2a2a" : void 0,
13555
+ paddingX: 1,
13556
+ width: "100%"
13557
+ },
13558
+ /* @__PURE__ */ React14.createElement(Text14, { color: isSelected ? "white" : "gray", bold: isSelected }, isSelected ? "\u276F " : " ", label)
13559
+ );
13560
+ };
13561
+ const renderProgressBar = (label, current, limit) => {
13562
+ const percent = limit > 0 ? Math.min(100, Math.round(current / limit * 100)) : 0;
13563
+ const barWidth = 15;
13564
+ const filledCount = Math.round(percent / 100 * barWidth);
13565
+ const barStr = "\u2588".repeat(filledCount) + "\u2591".repeat(Math.max(0, barWidth - filledCount));
13566
+ let barColor = "gray";
13567
+ if (percent >= 40 && percent <= 80) {
13568
+ barColor = "yellow";
13569
+ } else if (percent > 80) {
13570
+ barColor = "red";
13571
+ }
13572
+ return /* @__PURE__ */ React14.createElement(Box14, { flexDirection: "row", paddingLeft: 4, key: label }, /* @__PURE__ */ React14.createElement(Box14, { width: 18 }, /* @__PURE__ */ React14.createElement(Text14, { color: "gray" }, label, ": ")), /* @__PURE__ */ React14.createElement(Text14, { color: barColor }, barStr), /* @__PURE__ */ React14.createElement(Text14, { color: "gray" }, " ", percent, "% (", current, "/", limit >= 99999999 ? "\u221E" : limit, ")"));
13573
+ };
13332
13574
  const renderActiveView = () => {
13333
13575
  switch (activeView) {
13334
13576
  case "settings":
@@ -13353,9 +13595,9 @@ Selection: ${val}`,
13353
13595
  title: "SELECT AI PROVIDER",
13354
13596
  items: [
13355
13597
  { label: "Google (Free/Paid)", value: "Google" },
13598
+ { label: "Nvidia (Free/Paid)", value: "NVIDIA" },
13356
13599
  { label: "DeepSeek (Paid)", value: "DeepSeek" },
13357
13600
  { label: "OpenRouter (Free/Paid) [EXPERIMENTAL]", value: "OpenRouter" },
13358
- { label: "NVIDIA (Free/Paid)", value: "NVIDIA" },
13359
13601
  { label: "Back", value: "settings" }
13360
13602
  ],
13361
13603
  onSelect: async (item) => {
@@ -13383,7 +13625,7 @@ Selection: ${val}`,
13383
13625
  ...prev,
13384
13626
  {
13385
13627
  role: "system",
13386
- text: `\u2705 Switched to ${selectedProvider}! Key loaded from Vault. Model set to ${defaultModel}.`,
13628
+ text: `[SYSTEM] Switched to ${selectedProvider}! Key loaded from Cache. Model set to ${defaultModel}.`,
13387
13629
  isMeta: true
13388
13630
  }
13389
13631
  ]);
@@ -13402,14 +13644,31 @@ Selection: ${val}`,
13402
13644
  onClose: () => setActiveView("settings")
13403
13645
  }
13404
13646
  );
13405
- case "apiTier":
13406
- return /* @__PURE__ */ React14.createElement(
13407
- CommandMenu,
13647
+ case "apiTier": {
13648
+ const reqCurrent = dailyUsage?.agent || 0;
13649
+ const reqLimit = quotas.agentLimit || 99999999;
13650
+ const tokenCurrent = dailyUsage?.tokens || 0;
13651
+ const tokenLimit = quotas.tokenLimit || 99999999999999;
13652
+ const monthlyCurrent = quotas.resetMode === "Custom" ? customPeriodUsage?.tokens || 0 : monthlyUsage?.tokens || 0;
13653
+ const monthlyLimit = quotas.monthlyTokenLimit || 99999999999999;
13654
+ let resetInfo = "";
13655
+ if (quotas.resetMode === "Custom") {
13656
+ const today = /* @__PURE__ */ new Date();
13657
+ const resetDay = quotas.resetDay || 1;
13658
+ let resetMonth = today.getMonth();
13659
+ if (today.getDate() >= resetDay) {
13660
+ resetMonth += 1;
13661
+ }
13662
+ const resetDate = new Date(today.getFullYear(), resetMonth, resetDay);
13663
+ const monthName = resetDate.toLocaleString("default", { month: "short" });
13664
+ resetInfo = `Resets on: ${resetDay}-${monthName}`;
13665
+ }
13666
+ return /* @__PURE__ */ React14.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "white", padding: 0, width: "100%" }, /* @__PURE__ */ React14.createElement(Box14, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React14.createElement(Text14, { color: "gray", bold: true }, "SELECT YOUR CURRENT API TIER BASED ON YOUR PROVIDER. (Provider: ", aiProvider, ")")), /* @__PURE__ */ React14.createElement(
13667
+ SelectInput2,
13408
13668
  {
13409
- title: /* @__PURE__ */ React14.createElement(Text14, null, "SELECT YOUR CURRENT API TIER BASED ON ", /* @__PURE__ */ React14.createElement(Text14, { color: "cyan", underline: true, bold: true }, "\x1B]8;;https://aistudio.google.com/projects\x07AI STUDIO\x1B]8;;\x07"), ". (CURRENT: ", apiTier.toUpperCase(), ")"),
13410
13669
  items: [
13411
- { label: "Free Tier (Gemini API Free Tier)", value: "Free" },
13412
- { label: `Paid Tier (API with Billing Account)`, value: "Paid" },
13670
+ { label: "Provider Limits", value: "Free" },
13671
+ { label: `Set Budgets (API with Billing Account) ${apiTier === "Paid" ? "\u25CF" : ""}`, value: "Paid" },
13413
13672
  { label: "Back", value: "settings" }
13414
13673
  ],
13415
13674
  onSelect: (item) => {
@@ -13424,15 +13683,69 @@ Selection: ${val}`,
13424
13683
  label: "Enter Agent daily budget (requests made):",
13425
13684
  key: "quotas",
13426
13685
  subKey: "agentLimit",
13427
- value: String(quotas.agentLimit)
13686
+ value: quotas.agentLimit >= 99999999 ? "" : String(quotas.agentLimit),
13687
+ returnView: "settings",
13688
+ next: (newQuotas) => ({
13689
+ label: "Enter Agent daily budget (tokens used):",
13690
+ key: "quotas",
13691
+ subKey: "tokenLimit",
13692
+ value: newQuotas.tokenLimit >= 99999999999999 || newQuotas.tokenLimit === 0 ? "" : String(newQuotas.tokenLimit),
13693
+ returnView: "settings",
13694
+ next: (q2) => ({
13695
+ label: "Enter Agent monthly budget (tokens used):",
13696
+ key: "quotas",
13697
+ subKey: "monthlyTokenLimit",
13698
+ value: q2.monthlyTokenLimit >= 99999999999999 || q2.monthlyTokenLimit === 0 ? "" : String(q2.monthlyTokenLimit),
13699
+ returnView: "resetMode"
13700
+ })
13701
+ })
13428
13702
  });
13429
13703
  setActiveView("input");
13430
13704
  } else {
13431
- saveSettings({ apiTier: newTier, quotas });
13705
+ const newQuotas = { ...quotas, agentLimit: 99999999, tokenLimit: 99999999999999, monthlyTokenLimit: 99999999999999 };
13706
+ setQuotas(newQuotas);
13707
+ saveSettings({ apiTier: newTier, quotas: newQuotas });
13432
13708
  setActiveView("settings");
13433
13709
  }
13434
13710
  },
13435
- onClose: () => setActiveView("settings")
13711
+ itemComponent: CustomMenuItem,
13712
+ indicatorComponent: () => null
13713
+ }
13714
+ ), apiTier === "Paid" && /* @__PURE__ */ React14.createElement(Box14, { flexDirection: "column", marginTop: 1, borderStyle: "single", borderColor: "gray", paddingX: 1, width: "100%" }, /* @__PURE__ */ React14.createElement(Box14, { marginBottom: 1 }, /* @__PURE__ */ React14.createElement(Text14, { color: "white", bold: true }, "USAGE BUDGET STATUS")), renderProgressBar("Daily Requests", reqCurrent, reqLimit, "cyan"), renderProgressBar("Daily Tokens", tokenCurrent, tokenLimit, "green"), renderProgressBar("Monthly Tokens", monthlyCurrent, monthlyLimit, "yellow"), resetInfo ? /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 4, marginTop: 1 }, /* @__PURE__ */ React14.createElement(Text14, { color: "gray" }, "Monthly Reset : "), /* @__PURE__ */ React14.createElement(Text14, { color: "magenta", bold: true }, resetInfo)) : /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 4, marginTop: 1 }, /* @__PURE__ */ React14.createElement(Text14, { color: "gray" }, "Monthly Reset : "), /* @__PURE__ */ React14.createElement(Text14, { color: "blue", bold: true }, "Rolling 30-Day Window"))), /* @__PURE__ */ React14.createElement(Box14, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React14.createElement(Text14, { color: "gray", italic: true }, "(Arrows to select \u2022 Enter to confirm)")));
13715
+ }
13716
+ case "resetMode":
13717
+ return /* @__PURE__ */ React14.createElement(
13718
+ CommandMenu,
13719
+ {
13720
+ title: "SELECT MONTHLY RESET MODE",
13721
+ items: [
13722
+ { label: "Default (Rolling 30-Day Window)", value: "Rolling" },
13723
+ { label: "Custom (Set reset day of month)", value: "Custom" },
13724
+ { label: "Back", value: "apiTier" }
13725
+ ],
13726
+ onSelect: (item) => {
13727
+ if (item.value === "apiTier" || item.value === "Back") {
13728
+ setActiveView("apiTier");
13729
+ return;
13730
+ }
13731
+ const selectedMode = item.value;
13732
+ const updatedQuotas = { ...quotas, resetMode: selectedMode };
13733
+ setQuotas(updatedQuotas);
13734
+ if (selectedMode === "Custom") {
13735
+ setInputConfig({
13736
+ label: "Enter monthly reset day (1-30):",
13737
+ key: "quotas",
13738
+ subKey: "resetDay",
13739
+ value: String(quotas.resetDay || 1),
13740
+ returnView: "settings"
13741
+ });
13742
+ setActiveView("input");
13743
+ } else {
13744
+ saveSettings({ apiTier, quotas: updatedQuotas });
13745
+ setActiveView("settings");
13746
+ }
13747
+ },
13748
+ onClose: () => setActiveView("apiTier")
13436
13749
  }
13437
13750
  );
13438
13751
  case "input":
@@ -13446,7 +13759,10 @@ Selection: ${val}`,
13446
13759
  let newQuotas = { ...quotas };
13447
13760
  let newSettings = {};
13448
13761
  if (key === "quotas") {
13449
- const parsedValue = subKey.toLowerCase().includes("limit") ? parseInt(val) || 0 : val;
13762
+ let parsedValue = subKey.toLowerCase().includes("limit") || subKey === "resetDay" ? parseInt(val) || 0 : val;
13763
+ if (subKey === "resetDay") {
13764
+ parsedValue = Math.max(1, Math.min(30, parsedValue));
13765
+ }
13450
13766
  newQuotas[subKey] = parsedValue;
13451
13767
  setQuotas(newQuotas);
13452
13768
  newSettings.quotas = newQuotas;
@@ -13518,17 +13834,17 @@ Selection: ${val}`,
13518
13834
  )), /* @__PURE__ */ React14.createElement(Box14, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React14.createElement(Text14, { color: "gray", dimColor: true, italic: true }, "(Press Enter to confirm selection)")));
13519
13835
  case "stats": {
13520
13836
  const u = statsMode === "monthly" ? monthlyUsage : dailyUsage;
13521
- const trackerTitle = statsMode === "monthly" ? "LAST 30 DAYS USAGE TRACKER" : "DAILY USAGE TRACKER";
13522
- const timeLabel = statsMode === "monthly" ? "Wall Time (30d):" : "Wall Time Today:";
13523
- const tokensLabel = statsMode === "monthly" ? "Tokens Used (30d):" : "Tokens Used Today:";
13524
- const imagesLabel = statsMode === "monthly" ? "Images Made (30d):" : "Images Made Today:";
13525
- const imageCreditsLabel = statsMode === "monthly" ? "Image Credits (30d):" : "Image Credits Today:";
13526
- const codeChangesLabel = statsMode === "monthly" ? "Code Changes (30d):" : "Code Changes Today:";
13527
- const toolCallsLabel = statsMode === "monthly" ? "Tool Calls (30d):" : "Tool Calls Today:";
13837
+ const trackerTitle = statsMode === "monthly" ? "LAST 30 DAYS USAGE" : "TODAY's USAGE";
13838
+ const timeLabel = statsMode === "monthly" ? "Wall Time:" : "Wall Time:";
13839
+ const tokensLabel = statsMode === "monthly" ? "Tokens Used:" : "Tokens Used:";
13840
+ const imagesLabel = statsMode === "monthly" ? "Images Made:" : "Images Made:";
13841
+ const imageCreditsLabel = statsMode === "monthly" ? "Image Credits:" : "Image Credits:";
13842
+ const codeChangesLabel = statsMode === "monthly" ? "Code Changes:" : "Code Changes:";
13843
+ const toolCallsLabel = statsMode === "monthly" ? "Tool Calls:" : "Tool Calls:";
13528
13844
  return /* @__PURE__ */ React14.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "grey", paddingX: 3, paddingY: 1, paddingBottom: 0, width: Math.min(125, (stdout?.columns || 100) - 2) }, statsMode === "modelBreakdown" ? /* @__PURE__ */ React14.createElement(Box14, { flexDirection: "column" }, /* @__PURE__ */ React14.createElement(Text14, { color: "white", bold: true, underline: true }, "30-DAY MODEL TOKEN BREAKDOWN"), !monthlyUsage?.models || Object.keys(monthlyUsage.models).length === 0 ? /* @__PURE__ */ React14.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey", italic: true }, "No model token usage recorded in the last 30 days.")) : Object.entries(monthlyUsage.models).map(([provider, models]) => {
13529
13845
  const providerTotalTokens = Object.values(models).reduce((sum, m) => sum + (m.tokens || 0), 0);
13530
- return /* @__PURE__ */ React14.createElement(Box14, { key: provider, flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "cyan", bold: true }, provider, ":")), /* @__PURE__ */ React14.createElement(Text14, { color: "white", bold: true }, formatTokens(providerTotalTokens))), Object.entries(models).map(([modelName, stats]) => /* @__PURE__ */ React14.createElement(Box14, { key: modelName, flexDirection: "column", marginLeft: 4 }, /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 21 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "\xBB ", modelName, ":")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(stats.tokens || 0))), /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React14.createElement(Box14, { width: 17 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens((stats.tokens || 0) - (stats.candidateTokens || 0)))), (stats.cachedTokens || 0) > 0 && /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 5 }, /* @__PURE__ */ React14.createElement(Box14, { width: 16 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(stats.cachedTokens))), /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React14.createElement(Box14, { width: 17 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(stats.candidateTokens || 0))))));
13531
- })) : /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(Box14, { marginBottom: 1 }, /* @__PURE__ */ React14.createElement(Text14, { color: "white", bold: true, underline: true }, "SESSION TELEMETRY")), /* @__PURE__ */ React14.createElement(Box14, { flexDirection: "column" }, /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Session Duration:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatMsDuration(Date.now() - SESSION_START_TIME))), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Agent Interactions:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, sessionAgentCalls)), /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React14.createElement(Box14, { width: 23 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB API Time:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatMsDuration(sessionApiTime))), /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React14.createElement(Box14, { width: 23 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Tool Time:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatMsDuration(sessionToolTime))), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Background Tasks:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, sessionBackgroundCalls)), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Tokens Consumed:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(sessionTotalTokens))), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Active Context:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(sessionStats.tokens))), sessionTotalTokens > 0 && /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React14.createElement(Box14, { width: 23 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(sessionTotalTokens - sessionTotalCandidateTokens))), sessionTotalCachedTokens > 0 && /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React14.createElement(Box14, { width: 21 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(sessionTotalCachedTokens))), sessionTotalCandidateTokens > 0 && /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React14.createElement(Box14, { width: 23 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(sessionTotalCandidateTokens)))), sessionImageCount > 0 && /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Images Made:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, sessionImageCount)), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Image Credits:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, Number(((sessionImageCredits || 0) * 1e3).toFixed(0)), " credits"))), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Code Changes (Sess):")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, /* @__PURE__ */ React14.createElement(Text14, { color: "green" }, "+", linesAdded), " ", /* @__PURE__ */ React14.createElement(Text14, { color: "red" }, "-", linesRemoved))), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Tool Calls (Sess):")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, sessionToolSuccess + sessionToolFailure + sessionToolDenied, " ( "), /* @__PURE__ */ React14.createElement(Text14, { color: "green" }, "\u2713 ", sessionToolSuccess), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, " "), /* @__PURE__ */ React14.createElement(Text14, { color: "yellow" }, "\u2298 ", sessionToolDenied), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, " "), /* @__PURE__ */ React14.createElement(Text14, { color: "red" }, "\u2715 ", sessionToolFailure), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, " )"))), /* @__PURE__ */ React14.createElement(Box14, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React14.createElement(Text14, { color: "white", bold: true, underline: true }, trackerTitle), /* @__PURE__ */ React14.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, timeLabel)), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatDuration(u?.duration || 0))), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Agent Interactions:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, u?.agent || 0)), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Background Tasks:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, u?.background || 0)), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, tokensLabel)), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(u?.tokens || 0))), (u?.tokens || 0) > 0 && /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React14.createElement(Box14, { width: 23 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens((u?.tokens || 0) - (u?.candidateTokens || 0)))), (u?.cachedTokens || 0) > 0 && /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React14.createElement(Box14, { width: 21 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(u.cachedTokens))), (u?.candidateTokens || 0) > 0 && /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React14.createElement(Box14, { width: 23 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(u.candidateTokens)))), (u?.imageCalls?.length || 0) > 0 && /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, imagesLabel)), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, u.imageCalls.length)), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, imageCreditsLabel)), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, Number(((u.imageCalls.reduce((sum, c) => sum + c.cost, 0) || 0) * 1e3).toFixed(0)), " credits"))), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, codeChangesLabel)), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, /* @__PURE__ */ React14.createElement(Text14, { color: "green" }, "+", u?.linesAdded || 0), " ", /* @__PURE__ */ React14.createElement(Text14, { color: "red" }, "-", u?.linesRemoved || 0))), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, toolCallsLabel)), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, (u?.toolSuccess || 0) + (u?.toolFailure || 0) + (u?.toolDenied || 0), " ( "), /* @__PURE__ */ React14.createElement(Text14, { color: "green" }, "\u2713 ", u?.toolSuccess || 0), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, " "), /* @__PURE__ */ React14.createElement(Text14, { color: "yellow" }, "\u2298 ", u?.toolDenied || 0), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, " "), /* @__PURE__ */ React14.createElement(Text14, { color: "red" }, "\u2715 ", u?.toolFailure || 0), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, " )")))), /* @__PURE__ */ React14.createElement(Text14, { dimColor: true, marginTop: 1, italic: true }, "(Press TAB to toggle Daily/Monthly views, SPACE for Model Breakdown, ESC to return)"));
13846
+ return /* @__PURE__ */ React14.createElement(Box14, { key: provider, flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 40 }, /* @__PURE__ */ React14.createElement(Text14, { color: "cyan", bold: true }, provider, ":")), /* @__PURE__ */ React14.createElement(Text14, { color: "white", bold: true }, formatTokens(providerTotalTokens))), Object.entries(models).map(([modelName, stats]) => /* @__PURE__ */ React14.createElement(Box14, { key: modelName, flexDirection: "column", marginLeft: 4, marginTop: 1 }, /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 36 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "\xBB ", modelName, ":")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(stats.tokens || 0))), /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React14.createElement(Box14, { width: 32 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens((stats.tokens || 0) - (stats.candidateTokens || 0)))), (stats.cachedTokens || 0) > 0 && /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 5 }, /* @__PURE__ */ React14.createElement(Box14, { width: 31 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(stats.cachedTokens))), /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React14.createElement(Box14, { width: 32 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(stats.candidateTokens || 0))))));
13847
+ })) : /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(Box14, { marginBottom: 1 }, /* @__PURE__ */ React14.createElement(Text14, { color: "white", bold: true, underline: true }, "SESSION TELEMETRY")), /* @__PURE__ */ React14.createElement(Box14, { flexDirection: "column" }, /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Session Duration:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatMsDuration(Date.now() - SESSION_START_TIME))), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Model Requests:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, sessionAgentCalls)), /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React14.createElement(Box14, { width: 23 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB API Time:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatMsDuration(sessionApiTime))), /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React14.createElement(Box14, { width: 23 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Tool Time:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatMsDuration(sessionToolTime))), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Memory Agent:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, sessionBackgroundCalls)), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Tokens Consumed:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(sessionTotalTokens))), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Active Context:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(sessionStats.tokens))), sessionTotalTokens > 0 && /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React14.createElement(Box14, { width: 23 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(sessionTotalTokens - sessionTotalCandidateTokens))), sessionTotalCachedTokens > 0 && /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React14.createElement(Box14, { width: 21 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(sessionTotalCachedTokens))), sessionTotalCandidateTokens > 0 && /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React14.createElement(Box14, { width: 23 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(sessionTotalCandidateTokens)))), sessionImageCount > 0 && /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Images Made:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, sessionImageCount)), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Image Credits:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, Number(((sessionImageCredits || 0) * 1e3).toFixed(0)), " credits"))), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Code Changes (Sess):")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, /* @__PURE__ */ React14.createElement(Text14, { color: "green" }, "+", linesAdded), " ", /* @__PURE__ */ React14.createElement(Text14, { color: "red" }, "-", linesRemoved))), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Tool Calls (Sess):")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, sessionToolSuccess + sessionToolFailure + sessionToolDenied, " ( "), /* @__PURE__ */ React14.createElement(Text14, { color: "green" }, "\u2713 ", sessionToolSuccess), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, " "), /* @__PURE__ */ React14.createElement(Text14, { color: "yellow" }, "\u2298 ", sessionToolDenied), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, " "), /* @__PURE__ */ React14.createElement(Text14, { color: "red" }, "\u2715 ", sessionToolFailure), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, " )"))), /* @__PURE__ */ React14.createElement(Box14, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React14.createElement(Text14, { color: "white", bold: true, underline: true }, trackerTitle), /* @__PURE__ */ React14.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, timeLabel)), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatDuration(u?.duration || 0))), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Model Requests:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, u?.agent || 0)), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, "Memory Agent:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, u?.background || 0)), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, tokensLabel)), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(u?.tokens || 0))), (u?.tokens || 0) > 0 && /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React14.createElement(Box14, { width: 23 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens((u?.tokens || 0) - (u?.candidateTokens || 0)))), (u?.cachedTokens || 0) > 0 && /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React14.createElement(Box14, { width: 21 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(u.cachedTokens))), (u?.candidateTokens || 0) > 0 && /* @__PURE__ */ React14.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React14.createElement(Box14, { width: 23 }, /* @__PURE__ */ React14.createElement(Text14, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, formatTokens(u.candidateTokens)))), (u?.imageCalls?.length || 0) > 0 && /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, imagesLabel)), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, u.imageCalls.length)), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, imageCreditsLabel)), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, Number(((u.imageCalls.reduce((sum, c) => sum + c.cost, 0) || 0) * 1e3).toFixed(0)), " credits"))), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, codeChangesLabel)), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, /* @__PURE__ */ React14.createElement(Text14, { color: "green" }, "+", u?.linesAdded || 0), " ", /* @__PURE__ */ React14.createElement(Text14, { color: "red" }, "-", u?.linesRemoved || 0))), /* @__PURE__ */ React14.createElement(Box14, null, /* @__PURE__ */ React14.createElement(Box14, { width: 25 }, /* @__PURE__ */ React14.createElement(Text14, { color: "blue" }, toolCallsLabel)), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, (u?.toolSuccess || 0) + (u?.toolFailure || 0) + (u?.toolDenied || 0), " ( "), /* @__PURE__ */ React14.createElement(Text14, { color: "green" }, "\u2713 ", u?.toolSuccess || 0), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, " "), /* @__PURE__ */ React14.createElement(Text14, { color: "yellow" }, "\u2298 ", u?.toolDenied || 0), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, " "), /* @__PURE__ */ React14.createElement(Text14, { color: "red" }, "\u2715 ", u?.toolFailure || 0), /* @__PURE__ */ React14.createElement(Text14, { color: "white" }, " )")))), /* @__PURE__ */ React14.createElement(Text14, { dimColor: true, marginTop: 1, italic: true }, "(Press TAB to toggle Daily/Monthly views, SPACE for Model Breakdown, ESC to return)"));
13532
13848
  }
13533
13849
  case "autoExecDanger":
13534
13850
  return /* @__PURE__ */ React14.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "grey", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React14.createElement(Text14, { color: "white", bold: true, underline: true }, "SECURITY WARNING: YOLO MODE"), /* @__PURE__ */ React14.createElement(Text14, { marginTop: 1 }, "Turning this ON allows the agent to execute terminal commands automatically without requiring your approval for each step."), /* @__PURE__ */ React14.createElement(Text14, { marginTop: 1, color: "white" }, "RISKS INVOLVED:"), /* @__PURE__ */ React14.createElement(Text14, null, "\u2022 The agent may execute destructive commands (rm -rf, etc.) by mistake unless specified in sandbox rules."), /* @__PURE__ */ React14.createElement(Text14, null, "\u2022 Unintended system changes if the agent hallucinates a path or command."), /* @__PURE__ */ React14.createElement(Text14, null, "\u2022 Reduced control over the agent's step-by-step decision making."), /* @__PURE__ */ React14.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React14.createElement(
@@ -13984,9 +14300,9 @@ Selection: ${val}`,
13984
14300
  {
13985
14301
  items: [
13986
14302
  { label: "Google (Free/Paid)", value: "Google" },
14303
+ { label: "Nvidia (Free/Paid)", value: "NVIDIA" },
13987
14304
  { label: "DeepSeek (Paid)", value: "DeepSeek" },
13988
- { label: "OpenRouter (Free/Paid) [EXPERIMENTAL]", value: "OpenRouter" },
13989
- { label: "NVIDIA (Free/Paid)", value: "NVIDIA" }
14305
+ { label: "OpenRouter (Free/Paid) [EXPERIMENTAL]", value: "OpenRouter" }
13990
14306
  ],
13991
14307
  onSelect: (item) => {
13992
14308
  setAiProvider(item.value);
@@ -14461,7 +14777,7 @@ if (isBundled && !process.execArgv.some((arg) => arg.includes("max-old-space-siz
14461
14777
  const React16 = (await import("react")).default;
14462
14778
  const { useState: useState12 } = React16;
14463
14779
  const { render: render2, Box: Box15, Text: Text15 } = await import("ink");
14464
- const SelectInput2 = (await import("ink-select-input")).default;
14780
+ const SelectInput3 = (await import("ink-select-input")).default;
14465
14781
  const TextInput5 = (await import("ink-text-input")).default;
14466
14782
  return new Promise((resolve) => {
14467
14783
  const items = [
@@ -14499,7 +14815,7 @@ if (isBundled && !process.execArgv.some((arg) => arg.includes("max-old-space-siz
14499
14815
  )), /* @__PURE__ */ React16.createElement(Box15, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(Text15, { color: "gray", dimColor: true, italic: true }, " (Press Enter to confirm)")));
14500
14816
  }
14501
14817
  return /* @__PURE__ */ React16.createElement(Box15, { flexDirection: "column", marginY: 1 }, /* @__PURE__ */ React16.createElement(Box15, { marginBottom: 1 }, /* @__PURE__ */ React16.createElement(Text15, { color: "magenta", bold: true }, "\u{1F4E6} Select a package manager for the update:")), /* @__PURE__ */ React16.createElement(
14502
- SelectInput2,
14818
+ SelectInput3,
14503
14819
  {
14504
14820
  items,
14505
14821
  onSelect: handleSelect,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "2.10.3",
4
- "date": "2026-06-21",
3
+ "version": "2.11.0",
4
+ "date": "2026-06-22",
5
5
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
6
6
  "keywords": [
7
7
  "ai",