fluxflow-cli 3.0.12 → 3.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/fluxflow.js +291 -122
  2. package/package.json +1 -1
package/dist/fluxflow.js CHANGED
@@ -4267,9 +4267,8 @@ var init_ChatLayout = __esm({
4267
4267
  } else {
4268
4268
  content = wrapText(trimmed, columns - 4);
4269
4269
  }
4270
- const linesOfContent = content.split("\n");
4271
4270
  result.push(
4272
- /* @__PURE__ */ React4.createElement(Box3, { key: i, flexDirection: "column", width: "100%" }, linesOfContent.map((l, lIdx) => /* @__PURE__ */ React4.createElement(InlineMarkdown, { key: lIdx, text: l, color, italic })))
4271
+ /* @__PURE__ */ React4.createElement(Box3, { key: i, flexDirection: "column", width: "100%" }, /* @__PURE__ */ React4.createElement(InlineMarkdown, { text: content, color, italic }))
4273
4272
  );
4274
4273
  }
4275
4274
  });
@@ -4987,8 +4986,8 @@ function CommandMenu({ title, subtitle, items, onSelect }) {
4987
4986
  var CustomItem;
4988
4987
  var init_CommandMenu = __esm({
4989
4988
  "src/components/CommandMenu.jsx"() {
4990
- CustomItem = ({ label: label2, isSelected }) => {
4991
- const isCancel = label2 === "Cancel" || label2 === "Back" || label2.toLowerCase().includes("exit") || label2.toLowerCase().includes("back");
4989
+ CustomItem = ({ label, isSelected }) => {
4990
+ const isCancel = label === "Cancel" || label === "Back" || label.toLowerCase().includes("exit") || label.toLowerCase().includes("back");
4992
4991
  return /* @__PURE__ */ React6.createElement(
4993
4992
  Box5,
4994
4993
  {
@@ -4997,7 +4996,7 @@ var init_CommandMenu = __esm({
4997
4996
  paddingX: 1,
4998
4997
  width: "100%"
4999
4998
  },
5000
- /* @__PURE__ */ React6.createElement(Text6, { color: isSelected ? "white" : "gray", bold: isSelected }, isSelected ? "\u276F " : " ", label2)
4999
+ /* @__PURE__ */ React6.createElement(Text6, { color: isSelected ? "white" : "gray", bold: isSelected }, isSelected ? "\u276F " : " ", label)
5001
5000
  );
5002
5001
  };
5003
5002
  }
@@ -5186,23 +5185,26 @@ ${mode === "Flux" ? `- WORKSPACE TOOLS (path = relative to CWD & WILL BE FIRST A
5186
5185
  6. [tool:functions.SearchKeyword(keyword="...", file="optional", subString="true/false optional")]. Global project search. If 'file' is provided, searches only that file. Finds definitions/logic without reading every file. Usage: Can search for relevent lines/logic area to read specifically for edit
5187
5186
  7. [tool:functions.Run(command="...")]. Runs ${osDetected === "Windows" ? isPsAvailable() ? `WINDOWS POWERSHELL ONLY` : `WINDOWS CMD ONLY` : `BASH`} command. Destructive/Irreversible ops \u2192 Ask user
5188
5187
  8. [tool:functions.Todo(method="create/append/get", tasks=[ARRAY OF STRINGS], markDone=[ARRAY OF TASK STRINGS])]. Task List, NO Markdown IN ARRAY. USAGE: ANALYZE USER REQUEST **IF** MULTIPLE TASK \u2192 BREAK DOWN TASK \u2192 CREATE TODO **BEFORE** DIVING IN. 'tasks' & 'markDone' OPTIONAL PARAMETERS WITH method 'get'. USE 'get' method WITH 'markDone' to mark task completed. **EVERY TURN UPDATE POLICY**
5189
- 9. [tool:functions.await(time="seconds")]. For waiting without exiting agent loop, 15s - 180s
5188
+ 9. [tool:functions.Await(time="seconds")]. For waiting without exiting agent loop, 15s - 180s
5190
5189
 
5191
5190
  -- SUB AGENTS DEFINITIONS --
5192
- USE PROACTIVELY A LOT **USE OF SUB AGENTS HIGHLY RECOMENDED**
5191
+ **USING SUB AGENTS HIGHLY PREFERRED FOR MOST TASK**
5192
+ USE PROACTIVELY WITHOUT EXPLICIT USER COMMAND ALLOWED
5193
+
5193
5194
  Invocation Types:
5194
- - invoke (async, background worker for parallel tasks, upto 7 parallel agents together). Can take long time, If invoked DO NOT REPEAT SAME TASK AGAIN UNLESS subagent returns ERROR. Usage: Benefits parallelism & speed
5195
- - invokeSync (sync, blocking main agent loop). Usage: Repeatetive work, Sequential tasks, Task delegation. Huge tokens/costs savings
5195
+ - Invoke (async, background worker for parallel tasks, upto 7 parallel agents together). Can take long time, If invoked DO NOT REPEAT SAME TASK AGAIN UNLESS subagent returns ERROR. Usage: Benefits parallelism & speed
5196
+ - InvokeSync (sync, blocking main agent loop). Usage: Repeatetive work, Sequential tasks, Task delegation. Huge tokens/costs savings
5196
5197
 
5197
- 1. [agent:generalist.invokeSync/invoke(title="...", task="...")]. Task must me detailed, including exact file paths, imports/exports, dependency, folder structure
5198
- 2. [agent:generalist.getProgress(id="...")]. Usage: Check progress of async subagent task, taking time? continue your task, MUST await (exponentially longer after 1st check, eg. 15s, 30s, 45s ...) than spamming getProgress. NEVER FINISH WITHOUT 'AWAIT' WHILE SUBAGENT WORKING`.trim() : `- CREATIVE TOOLS (path = relative to CWD & WILL BE FIRST ARGUMENT, path separator: '/') -
5198
+ 1. [agent:generalist.InvokeSync/Invoke(title="...", task="...")]. Task must me detailed, including exact file paths, imports/exports, dependency, folder structure
5199
+ 2. [agent:generalist.GetProgress(id="...")]. Usage: Check progress of async subagent task, taking time? continue your task, MUST await (exponentially longer after 1st check, eg. 15s, 30s, 45s ...) than spamming getProgress. NEVER FINISH WITHOUT 'AWAIT' WHILE SUBAGENT WORKING
5200
+ 3. [agent:generalist.Cancel(id="...")]. Usage: Cancel async subagent task, LAST RESORT IF SUB AGENT IS STUCK FOR UNUSUALLY LONG (2m+) WITH NO PROGRESS`.trim() : `- CREATIVE TOOLS (path = relative to CWD & WILL BE FIRST ARGUMENT, path separator: '/') -
5199
5201
  1. [tool:functions.WritePDF(path="...", content="...", orientation="...")]. PROACTIVE A4 PAGE BREAKS MUST IN CSS. HTML/CSS for PREMIUM layout
5200
5202
  2. [tool:functions.WriteDoc(path="...", content="...")]. A4 Word document
5201
5203
  - WORKSPACE & SUB AGENT TOOLS ARE NOT AVAILABLE IN FLOW`.trim()}
5202
5204
 
5203
5205
  - VERIFY TOOL RESULT CONTENTS. Fix errors. No hallucinations
5204
5206
  - Escape quotes: \\" for code strings
5205
- - Literal escapes: Double-escape sequences (e.g., \\\\n, \\\\t)
5207
+ - Literal escapes: Double-escape sequences (e.g., \\\\n)
5206
5208
  - File structure: Real newlines for code formatting`.trim();
5207
5209
  }
5208
5210
  });
@@ -8412,10 +8414,10 @@ var init_ask_user = __esm({
8412
8414
  if (key.startsWith("option")) {
8413
8415
  const val = parsed[key];
8414
8416
  if (typeof val === "string" && val.includes("::")) {
8415
- const [label2, desc] = val.split("::");
8417
+ const [label, desc] = val.split("::");
8416
8418
  options.push({
8417
8419
  id: key,
8418
- label: label2.trim(),
8420
+ label: label.trim(),
8419
8421
  description: desc.trim()
8420
8422
  });
8421
8423
  } else {
@@ -9282,13 +9284,13 @@ function traverse(node, depth = 0, isLast = true, prefix = "", parentName = null
9282
9284
  const startLine = node.startPosition.row + 1;
9283
9285
  const endLine = node.endPosition.row + 1;
9284
9286
  const camelType = toCamelCase(type);
9285
- const label2 = name ? `${camelType} [${name}]` : camelType;
9287
+ const label = name ? `${camelType} [${name}]` : camelType;
9286
9288
  if (depth === 0) {
9287
9289
  result += `\u{1F4C1} ROOT (Lines: ${startLine}-${endLine})
9288
9290
  `;
9289
9291
  nextPrefix = prefix;
9290
9292
  } else {
9291
- result += `${prefix}${isLast ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 "}${label2} (Lines: ${startLine}-${endLine})
9293
+ result += `${prefix}${isLast ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 "}${label} (Lines: ${startLine}-${endLine})
9292
9294
  `;
9293
9295
  nextPrefix += isLast ? " " : "\u2502 ";
9294
9296
  }
@@ -9671,15 +9673,30 @@ var init_invoke = __esm({
9671
9673
  let currentTurnLogs = [];
9672
9674
  const subagentContext = {
9673
9675
  ...context,
9674
- onVisualFeedback: null,
9676
+ taskId,
9677
+ onVisualFeedback: (feedbackLabel) => {
9678
+ taskEntry.lastChunkTime = Date.now();
9679
+ const clean = feedbackLabel.replace(/\x1b\[[0-9;]*m/g, "");
9680
+ const match = clean.match(/[✔✘✗✖🔍📖→➕↻•]\s*([A-Za-z0-9\s-]+)/);
9681
+ if (match) {
9682
+ taskEntry.currentTool = match[1].trim();
9683
+ } else {
9684
+ taskEntry.currentTool = clean;
9685
+ }
9686
+ if (context.onSubagentUpdate) {
9687
+ context.onSubagentUpdate();
9688
+ }
9689
+ },
9675
9690
  onTokenChunk: () => {
9676
9691
  taskEntry.lastChunkTime = Date.now();
9692
+ taskEntry.currentTool = "Thinking";
9677
9693
  if (context.onSubagentUpdate) {
9678
9694
  context.onSubagentUpdate();
9679
9695
  }
9680
9696
  }
9681
9697
  };
9682
9698
  runSubagent2(task, subagentContext, model, allowedTools, 20, (logMessage) => {
9699
+ if (taskEntry.status === "cancelled") return;
9683
9700
  if (logMessage.startsWith("[Subagent Turn")) {
9684
9701
  if (currentTurnLogs.length > 0) {
9685
9702
  taskEntry.progress.push([...currentTurnLogs]);
@@ -9689,7 +9706,9 @@ var init_invoke = __esm({
9689
9706
  if (logMessage.includes("[Executing Tool]")) {
9690
9707
  const m = logMessage.match(/\[Executing Tool\]\s*([a-zA-Z0-9_]+)/);
9691
9708
  if (m) {
9692
- taskEntry.currentTool = m[1];
9709
+ if (!taskEntry.currentTool || taskEntry.currentTool === "Thinking") {
9710
+ taskEntry.currentTool = m[1];
9711
+ }
9693
9712
  }
9694
9713
  }
9695
9714
  let displayLog = logMessage;
@@ -9704,6 +9723,7 @@ var init_invoke = __esm({
9704
9723
  context.onSubagentUpdate();
9705
9724
  }
9706
9725
  }).then((finalAnswer) => {
9726
+ if (taskEntry.status === "cancelled") return;
9707
9727
  currentTurnLogs.push(`[SUBAGENT SUCCESS] Final Answer:
9708
9728
  ${finalAnswer}`);
9709
9729
  taskEntry.progress.push([...currentTurnLogs]);
@@ -9713,6 +9733,7 @@ ${finalAnswer}`);
9713
9733
  context.onSubagentUpdate();
9714
9734
  }
9715
9735
  }).catch((err) => {
9736
+ if (taskEntry.status === "cancelled") return;
9716
9737
  currentTurnLogs.push(`[SUBAGENT FAILURE] Error: ${err.message}`);
9717
9738
  taskEntry.progress.push([...currentTurnLogs]);
9718
9739
  taskEntry.status = "failed";
@@ -9754,7 +9775,72 @@ var init_getProgress = __esm({
9754
9775
  task.progress.forEach((turnLogs, index) => {
9755
9776
  output += `--- Turn ${index + 1} ---
9756
9777
  `;
9757
- output += turnLogs.join("\n") + "\n\n";
9778
+ const processedLogs = turnLogs.map((log) => {
9779
+ if (log.startsWith("[Subagent Response]")) {
9780
+ const header = "[Subagent Response]";
9781
+ const body = log.substring(header.length);
9782
+ let result = body;
9783
+ const trigger = "tool:functions.";
9784
+ while (true) {
9785
+ const lowerResult = result.toLowerCase();
9786
+ const triggerIdx = lowerResult.indexOf(trigger);
9787
+ if (triggerIdx === -1) break;
9788
+ let startIdx = triggerIdx;
9789
+ let hasOuterBracket = false;
9790
+ let k = triggerIdx - 1;
9791
+ while (k >= 0 && /\s/.test(result[k])) k--;
9792
+ if (k >= 0 && result[k] === "[") {
9793
+ startIdx = k;
9794
+ hasOuterBracket = true;
9795
+ }
9796
+ let balance = 0;
9797
+ let foundStart = false;
9798
+ let inString = null;
9799
+ let j = triggerIdx;
9800
+ while (j < result.length) {
9801
+ const char = result[j];
9802
+ if (!inString && (char === "'" || char === '"' || char === "`")) {
9803
+ inString = char;
9804
+ } else if (inString && char === inString && result[j - 1] !== "\\") {
9805
+ inString = null;
9806
+ }
9807
+ if (!inString) {
9808
+ if (char === "(") {
9809
+ balance++;
9810
+ foundStart = true;
9811
+ } else if (char === ")") {
9812
+ balance--;
9813
+ }
9814
+ }
9815
+ if (foundStart && balance === 0 && !inString) {
9816
+ let endIdx = j;
9817
+ if (hasOuterBracket) {
9818
+ let m = j + 1;
9819
+ while (m < result.length && /\s/.test(result[m])) m++;
9820
+ if (m < result.length && result[m] === "]") {
9821
+ endIdx = m;
9822
+ }
9823
+ }
9824
+ result = result.substring(0, startIdx) + result.substring(endIdx + 1);
9825
+ break;
9826
+ }
9827
+ j++;
9828
+ if (j === result.length) {
9829
+ result = result.substring(0, startIdx);
9830
+ break;
9831
+ }
9832
+ }
9833
+ }
9834
+ return header + "\n" + result.trim();
9835
+ }
9836
+ if (log.startsWith("[Executing Tool]")) {
9837
+ if (log.length > 256) {
9838
+ return log.substring(0, 256) + "...[truncated from logs]";
9839
+ }
9840
+ }
9841
+ return log;
9842
+ });
9843
+ output += processedLogs.join("\n") + "\n\n";
9758
9844
  });
9759
9845
  if (task.status === "completed" && task.finalAnswer) {
9760
9846
  output += `Final Answer:
@@ -9769,6 +9855,37 @@ ${task.finalAnswer}
9769
9855
  }
9770
9856
  });
9771
9857
 
9858
+ // src/tools/cancel.js
9859
+ var cancel;
9860
+ var init_cancel = __esm({
9861
+ "src/tools/cancel.js"() {
9862
+ init_subagent_state();
9863
+ init_arg_parser();
9864
+ cancel = async (args, context = {}) => {
9865
+ const parsed = parseArgs(args);
9866
+ const id = parsed.id;
9867
+ if (!id) {
9868
+ return 'ERROR: Missing "id" argument for cancel.';
9869
+ }
9870
+ const task = subagentProgress.find((t) => t.id === id);
9871
+ if (!task) {
9872
+ return `ERROR: Subagent task with ID [${id}] not found.`;
9873
+ }
9874
+ if (task.status === "completed" || task.status === "failed") {
9875
+ return `INFO: Subagent task with ID [${id}] has already finished with status [${task.status.toUpperCase()}].`;
9876
+ }
9877
+ if (task.status === "cancelled") {
9878
+ return `INFO: Subagent task with ID [${id}] is already cancelled.`;
9879
+ }
9880
+ task.status = "cancelled";
9881
+ if (context.onSubagentUpdate) {
9882
+ context.onSubagentUpdate();
9883
+ }
9884
+ return `SUCCESS: Subagent task with ID [${id}] has been cancelled.`;
9885
+ };
9886
+ }
9887
+ });
9888
+
9772
9889
  // src/tools/await.js
9773
9890
  var awaitTool;
9774
9891
  var init_await = __esm({
@@ -9829,6 +9946,7 @@ var init_tools = __esm({
9829
9946
  init_invokeSync();
9830
9947
  init_invoke();
9831
9948
  init_getProgress();
9949
+ init_cancel();
9832
9950
  init_await();
9833
9951
  TOOL_MAP = {
9834
9952
  web_search,
@@ -9851,6 +9969,7 @@ var init_tools = __esm({
9851
9969
  invokeSync,
9852
9970
  invoke,
9853
9971
  getProgress,
9972
+ cancel,
9854
9973
  invoke_sync: invokeSync,
9855
9974
  get_progress: getProgress,
9856
9975
  ask: ask_user,
@@ -9882,6 +10001,7 @@ var init_tools = __esm({
9882
10001
  InvokeSync: invokeSync,
9883
10002
  Invoke: invoke,
9884
10003
  GetProgress: getProgress,
10004
+ Cancel: cancel,
9885
10005
  await: awaitTool,
9886
10006
  Await: awaitTool
9887
10007
  };
@@ -10048,14 +10168,15 @@ var init_ai = __esm({
10048
10168
  init_terminal();
10049
10169
  init_text();
10050
10170
  init_settings();
10171
+ init_subagent_state();
10051
10172
  init_paths();
10052
10173
  init_revert();
10053
10174
  init_editor();
10054
10175
  client = null;
10055
10176
  globalSettings = {};
10056
- colorMainWords = (label2) => {
10057
- if (!label2) return label2;
10058
- return label2.replace(/(?:(\x1b\[\d+m))?([✔✗✖🔍📖→➕↻•])(?:(\x1b\[\d+m))?\s*\b(Created|Read|Edited|Viewed|Auto-Read|List|Generated|Written|Searched|Get Map|Write Canceled|Edit Canceled|Write Cancelled|Edit Denied|Visited|Updated|Reviewed|Delegated|Background|Checked|Elevating SubAgent|Checking SubAgent Work|Awaiting)\b/ig, (match, ansiBefore, icon, ansiAfter, word) => {
10177
+ colorMainWords = (label) => {
10178
+ if (!label) return label;
10179
+ return label.replace(/(?:(\x1b\[\d+m))?([✔✘✖🔍📖→➕↻•⊘])(?:(\x1b\[\d+m))?\s*\b(Created|Read|Edited|Viewed|Auto-Read|List|Generated|Written|Searched|Get Map|Write Canceled|Edit Canceled|Write Cancelled|Edit Denied|Visited|Updated|Reviewed|Delegated|Background|Checked|Indexed|Analyzed|Browsed|Elevating SubAgent|Checking SubAgent Work|Invoked Background-Agent|Unsupported Modality|Awaiting|Cancelled)\b/ig, (match, ansiBefore, icon, ansiAfter, word) => {
10059
10180
  return `${ansiBefore || ""}${icon}${ansiAfter || ""} \x1B[95m${word}\x1B[0m`;
10060
10181
  });
10061
10182
  };
@@ -10068,7 +10189,7 @@ var init_ai = __esm({
10068
10189
  try {
10069
10190
  return await fn();
10070
10191
  } catch (error) {
10071
- if (signal?.aborted || error?.name === "AbortError") {
10192
+ if (signal?.aborted || error?.name === "AbortError" || error?.message === "Subagent task was cancelled.") {
10072
10193
  throw error;
10073
10194
  }
10074
10195
  attempt++;
@@ -10644,6 +10765,7 @@ var init_ai = __esm({
10644
10765
  "invoke_sync": "Spawning SubAgent",
10645
10766
  "invoke": "Spawning SubAgent",
10646
10767
  "get_progress": "Checking SubAgent",
10768
+ "cancel": "Cancelling",
10647
10769
  "await": "Waiting"
10648
10770
  };
10649
10771
  getToolDetail = (toolName, argsStr) => {
@@ -10653,7 +10775,7 @@ var init_ai = __esm({
10653
10775
  if (normToolName === "invokesync" || normToolName === "invoke") {
10654
10776
  return pArgs.title || (pArgs.task ? pArgs.task.substring(0, 30) : null);
10655
10777
  }
10656
- if (normToolName === "getprogress") {
10778
+ if (normToolName === "getprogress" || normToolName === "cancel") {
10657
10779
  return pArgs.id || pArgs.taskId;
10658
10780
  }
10659
10781
  const filePath = pArgs.path || pArgs.targetFile || pArgs.TargetFile || pArgs.directory;
@@ -11267,6 +11389,12 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
11267
11389
  stream = genStream;
11268
11390
  }
11269
11391
  for await (const chunk of stream) {
11392
+ if (settings?.taskId && typeof subagentProgress !== "undefined") {
11393
+ const taskObj = subagentProgress.find((t) => t.id === settings.taskId);
11394
+ if (taskObj && taskObj.status === "cancelled") {
11395
+ throw new Error("Subagent task was cancelled.");
11396
+ }
11397
+ }
11270
11398
  if (settings && typeof settings.onTokenChunk === "function") {
11271
11399
  settings.onTokenChunk();
11272
11400
  }
@@ -11296,7 +11424,7 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
11296
11424
  });
11297
11425
  }
11298
11426
  }
11299
- await incrementUsage(usageKey, aiProvider);
11427
+ await incrementUsage("agent", aiProvider);
11300
11428
  return { text: fullText, usageMetadata };
11301
11429
  });
11302
11430
  };
@@ -11527,6 +11655,15 @@ Provide a consolidated summary of the entire session.`;
11527
11655
  modifiedHistory = slicedHistory;
11528
11656
  }
11529
11657
  }
11658
+ modifiedHistory = modifiedHistory.map((msg) => {
11659
+ if (msg.role === "user" && msg.text) {
11660
+ const match2 = msg.text.match(/\[USER\]([\s\S]*?)\[\/USER\]/);
11661
+ if (match2) {
11662
+ return { ...msg, text: match2[1].trim() };
11663
+ }
11664
+ }
11665
+ return { ...msg };
11666
+ });
11530
11667
  let contextCompressionCount = 255e3;
11531
11668
  let contextTruncationCount = 26e4;
11532
11669
  if (aiProvider === "NVIDIA" && (modelName?.includes("glm") || modelName?.includes("gpt") || modelName?.includes("qwen"))) {
@@ -11819,8 +11956,8 @@ Provide a consolidated summary of the entire session.`;
11819
11956
  if (hasExistingTurnsAfterCompression && currentSummary) {
11820
11957
  if (modifiedHistory[0] && (modifiedHistory[0].role === "user" || modifiedHistory[0].role === "system")) {
11821
11958
  if (!modifiedHistory[0].text.includes("**CONTEXT SUMMARY OF PREVIOUS TURNS")) {
11822
- modifiedHistory[0].text = `[SYSTEM METADATA (PRIORITY: HIGH)]
11823
- **CONTEXT SUMMARY OF PREVIOUS TURNS (PRIORITY: HIGH)**
11959
+ modifiedHistory[0].text = `[SYSTEM METADATA]
11960
+ **CONTEXT SUMMARY OF PREVIOUS TURNS (PRIORITY: DYNAMIC)**
11824
11961
  ${currentSummary}
11825
11962
 
11826
11963
  [USER] ${modifiedHistory[0].text}`;
@@ -11829,8 +11966,8 @@ ${currentSummary}
11829
11966
  }
11830
11967
  }
11831
11968
  const activeSummaryBlock = currentSummary && !hasExistingTurnsAfterCompression ? `
11832
- [SYSTEM METADATA (PRIORITY: HIGH)]
11833
- **CONTEXT SUMMARY OF PREVIOUS TURNS (PRIORITY: HIGH)**
11969
+ [SYSTEM METADATA]
11970
+ **CONTEXT SUMMARY OF PREVIOUS TURNS (PRIORITY: DYNAMIC)**
11834
11971
  ${currentSummary}
11835
11972
  ` : "";
11836
11973
  let dirStructure = process.cwd() + "\n" + getDirTree(process.cwd(), dynamicMaxDepth);
@@ -12013,6 +12150,7 @@ ${ideCtx.warnings}
12013
12150
  const isMultimodalFile = isImage || isPdf || isOfficeFile;
12014
12151
  const isSupported = aiProvider === "Google" || MULTIMODAL_MODELS.includes(modelName);
12015
12152
  if (isMultimodalFile && !isSupported) {
12153
+ const label = `\u2718 Unsupported Modality: ${path19.basename(filePath)}`;
12016
12154
  let terminalWidth = 115;
12017
12155
  if (process.stdout.isTTY) {
12018
12156
  terminalWidth = process.stdout.columns - 5 || 120;
@@ -12024,7 +12162,8 @@ ${ideCtx.warnings}
12024
12162
  const boxMid = boxLines.map((line) => `${line.padEnd(boxWidth - 2).substring(0, boxWidth - 2)}`).join("\n");
12025
12163
  const boxBottom = `${" ".repeat(boxWidth)}`;
12026
12164
  yield { type: "visual_feedback", content: colorMainWords(`${boxBottom}
12027
- ${boxMid}`) };
12165
+ ${boxMid}
12166
+ `) };
12028
12167
  continue;
12029
12168
  }
12030
12169
  const finalStart = startLine !== null ? startLine : 1;
@@ -12054,12 +12193,12 @@ ${boxMid}`) };
12054
12193
  isError = true;
12055
12194
  }
12056
12195
  if (!isError) {
12057
- let label2 = "";
12196
+ let label = "";
12058
12197
  if (isImage) {
12059
- label2 = `\u2714 Viewed: ${filePath}`;
12198
+ label = `\u2714 Viewed: ${filePath}`;
12060
12199
  attachedBinaryPart = binPart;
12061
12200
  } else if (isPdf || isOfficeFile) {
12062
- label2 = `\u2714 Viewed: ${filePath}`;
12201
+ label = `\u2714 Viewed: ${filePath}`;
12063
12202
  attachedBinaryPart = binPart;
12064
12203
  } else {
12065
12204
  let totalLines = "...";
@@ -12068,15 +12207,15 @@ ${boxMid}`) };
12068
12207
  totalLines = content.split("\n").length;
12069
12208
  } catch (e) {
12070
12209
  }
12071
- label2 = `\u2714 Auto-Read: ${filePath} \u2192 Lines ${finalStart} - ${Math.min(finalEnd, totalLines)} of ${totalLines}`;
12210
+ label = `\u2714 Auto-Read: ${filePath} \u2192 Lines ${finalStart} - ${Math.min(finalEnd, totalLines)} of ${totalLines}`;
12072
12211
  taggedContextBlocks.push(textResult);
12073
12212
  }
12074
- if (label2) {
12213
+ if (label) {
12075
12214
  let terminalWidth = 115;
12076
12215
  if (process.stdout.isTTY) {
12077
12216
  terminalWidth = process.stdout.columns - 5 || 120;
12078
12217
  }
12079
- const boxLines = [label2];
12218
+ const boxLines = [label];
12080
12219
  const maxLen = Math.max(...boxLines.map((l) => l.length));
12081
12220
  const boxWidth = Math.min(maxLen + 4, terminalWidth);
12082
12221
  const boxMid = boxLines.map((line) => `${line.padEnd(boxWidth - 2).substring(0, boxWidth - 2)}`).join("\n");
@@ -12690,6 +12829,8 @@ ${ideErr} [/ERROR]`;
12690
12829
  "invoke": "invoke",
12691
12830
  "invokeSync": "invoke_sync",
12692
12831
  "getProgress": "get_progress",
12832
+ "GetProgress": "get_progress",
12833
+ "Cancel": "cancel",
12693
12834
  "await": "await",
12694
12835
  "Await": "await"
12695
12836
  };
@@ -12712,7 +12853,7 @@ ${ideErr} [/ERROR]`;
12712
12853
  } else if (id && potentialTool === "get_progress") {
12713
12854
  detail = id.replace(/["']/g, "");
12714
12855
  } else if (timeVal && potentialTool === "await") {
12715
- let sec = parseFloat(timeVal.replace(/["']/g, ""));
12856
+ let sec = parseFloat(String(timeVal).replace(/["']/g, ""));
12716
12857
  if (!isNaN(sec)) {
12717
12858
  if (sec < 5) sec = 5;
12718
12859
  if (sec > 120) sec = 120;
@@ -12726,7 +12867,7 @@ ${ideErr} [/ERROR]`;
12726
12867
  };
12727
12868
  detail = formatTime(sec);
12728
12869
  } else {
12729
- detail = timeVal.replace(/["']/g, "");
12870
+ detail = String(timeVal).replace(/["']/g, "");
12730
12871
  }
12731
12872
  } else {
12732
12873
  const m = partialArgs.match(/(?:path|targetFile|TargetFile|directory|keyword|id|taskId|title|task)\s*=\s*\\?["']?([^\\"' \),]+)/);
@@ -12747,20 +12888,22 @@ ${ideErr} [/ERROR]`;
12747
12888
  yield { type: "status", content: `${currentLabel}...` };
12748
12889
  if (process.stdout.isTTY) {
12749
12890
  const TOOL_TITLES = {
12750
- "web_search": "Searching",
12751
- "web_scrape": "Reading",
12752
- "view_file": "Reading",
12753
- "read_folder": "Reading",
12891
+ "WebSearch": "Searching",
12892
+ "WebScrape": "Reading",
12893
+ "ReadFile": "Reading",
12894
+ "ReadFolder": "Reading",
12754
12895
  "list_files": "Reading",
12755
- "write_file": "Writing",
12756
- "update_file": "Editing",
12757
- "write_pdf": "Creating",
12758
- "write_docx": "Creating",
12759
- "search_keyword": "Searching",
12760
- "exec_command": "Executing",
12761
- "ask": "User Input",
12762
- "memory": "Updating Memory",
12763
- "generate_image": "Generating"
12896
+ "WriteFile": "Writing",
12897
+ "UpdateFile": "Editing",
12898
+ "WritePdf": "Creating",
12899
+ "WriteDocx": "Creating",
12900
+ "SearchKeyword": "Searching",
12901
+ "Run": "Executing",
12902
+ "Ask": "User Input Required",
12903
+ "Memory": "Updating Memory",
12904
+ "GenerateImage": "Generating",
12905
+ "InvokeSync": "Sub-Agent Working",
12906
+ "Await": "Waiting"
12764
12907
  };
12765
12908
  const toolTitle = TOOL_TITLES[potentialTool] || "Working";
12766
12909
  process.stdout.write(`\x1B]0;${toolTitle}...\x07`);
@@ -12891,6 +13034,9 @@ ${ideErr} [/ERROR]`;
12891
13034
  "invoke": "invoke",
12892
13035
  "invokeSync": "invoke_sync",
12893
13036
  "getProgress": "get_progress",
13037
+ "GetProgress": "get_progress",
13038
+ "Cancel": "cancel",
13039
+ "cancel": "cancel",
12894
13040
  "await": "await",
12895
13041
  "Await": "await"
12896
13042
  };
@@ -12898,13 +13044,13 @@ ${ideErr} [/ERROR]`;
12898
13044
  const displayLabel = TOOL_LABELS2[normToolName] || toolCall.toolName;
12899
13045
  const detail = getToolDetail(normToolName, toolCall.args);
12900
13046
  yield { type: "status", content: `${displayLabel}${detail ? ` (${detail})` : ""}...` };
12901
- let label2 = "";
13047
+ let label = "";
12902
13048
  if (normToolName === "web_search") {
12903
13049
  const { query, limit = 10 } = parseArgs(toolCall.args);
12904
- label2 = `\u2714 Searched: ${query} \u2192 ${limit}`;
13050
+ label = `\u2714 Searched: ${query} \u2192 ${limit}`;
12905
13051
  } else if (normToolName === "web_scrape") {
12906
13052
  const url = parseArgs(toolCall.args).url || "...";
12907
- label2 = `\u2714 Visited: ${url}`;
13053
+ label = `\u2714 Visited: ${url}`;
12908
13054
  } else if (normToolName === "view_file") {
12909
13055
  const { path: targetPath2, StartLine, EndLine, start_line, end_line, startLine, endLine } = parseArgs(toolCall.args);
12910
13056
  const rawStart = StartLine || start_line || startLine;
@@ -12928,38 +13074,44 @@ ${ideErr} [/ERROR]`;
12928
13074
  const isOfficeFile = pathLower.endsWith(".docx") || pathLower.endsWith(".doc") || pathLower.endsWith(".ppt") || pathLower.endsWith(".pptx") || pathLower.endsWith(".xls") || pathLower.endsWith(".xlsx");
12929
13075
  const isImage = /\.(png|jpg|jpeg|webp|gif|bmp)$/.test(pathLower);
12930
13076
  if (isPdf || isOfficeFile) {
12931
- label2 = `\u2714 Viewed: ${targetPath2}`;
13077
+ label = `\u2714 Analyzed: ${targetPath2}`;
12932
13078
  } else if (isImage) {
12933
- label2 = `\u2714 Viewed: ${targetPath2}`;
13079
+ label = `\u2714 Analyzed: ${targetPath2}`;
12934
13080
  } else {
12935
- label2 = `${totalLines !== "..." ? "\u2714" : "\u2717"} Read: ${targetPath2} \u2192 ${totalLines !== "..." ? `Lines ${sLine} - ${actualEndLine} of ${totalLines}` : "File Not Found"}`;
13081
+ label = `${totalLines !== "..." ? "\u2714" : "\u2718"} Read: ${targetPath2} \u2192 ${totalLines !== "..." ? `Lines ${sLine} - ${actualEndLine} of ${totalLines}` : "File Not Found"}`;
12936
13082
  }
12937
13083
  } else if (normToolName === "list_files" || normToolName === "read_folder") {
12938
- const action = normToolName === "list_files" ? "List" : "Viewed";
13084
+ const action = normToolName === "list_files" ? "List" : "Browsed";
12939
13085
  const path21 = parseArgs(toolCall.args).path;
12940
- label2 = `\u2714 ${action}: ${path21 === "." ? "./" : path21}`;
13086
+ label = `\u2714 ${action}: ${path21 === "." ? "./" : path21}`;
12941
13087
  } else if (normToolName === "write_file" || normToolName === "update_file") {
12942
13088
  const action = normToolName === "write_file" ? "Created" : "Edited";
12943
- label2 = `\u2714 ${action}: ${parseArgs(toolCall.args).path || "..."}`;
13089
+ label = `\u2714 ${action}: ${parseArgs(toolCall.args).path || "..."}`;
12944
13090
  } else if (normToolName === "write_pdf") {
12945
- label2 = `\u2714 Created: ${parseArgs(toolCall.args).path || "..."}
13091
+ label = `\u2714 Created: ${parseArgs(toolCall.args).path || "..."}
12946
13092
  `;
12947
13093
  } else if (normToolName === "write_docx") {
12948
- label2 = `\u2714 Created: ${parseArgs(toolCall.args).path || "..."}
13094
+ label = `\u2714 Created: ${parseArgs(toolCall.args).path || "..."}
12949
13095
  `;
12950
13096
  } else if (normToolName === "file_map") {
12951
- label2 = `\u2714 Get Map: ${parseArgs(toolCall.args).path || "..."}`;
13097
+ label = `\u2714 Indexed: ${parseArgs(toolCall.args).path || "..."}`;
12952
13098
  } else if (normToolName.toLowerCase() === "search_keyword" || normToolName.toLowerCase() === "todo") {
12953
- label2 = "";
13099
+ label = "";
12954
13100
  } else if (normToolName.toLowerCase() === "generate_image") {
12955
13101
  const { path: argPath, outputPath, output } = parseArgs(toolCall.args);
12956
- label2 = `\u2714 Generated: ${argPath || outputPath || output || "generated_image.png"}`;
12957
- } else if (normToolName === "invoke_sync" || normToolName === "invoke") {
13102
+ label = `\u2714 Generated: ${argPath || outputPath || output || "generated_image.png"}`;
13103
+ } else if (normToolName === "invoke_sync" || normToolName === "InvokeSync") {
13104
+ const detail2 = getToolDetail(normToolName, toolCall.args);
13105
+ label = `\u2714 Invoked Sub-Agent${detail2 ? `: ${detail2}` : ""}`;
13106
+ } else if (normToolName === "Invoke" || normToolName === "InvokeAsync" || normToolName === "invoke") {
12958
13107
  const detail2 = getToolDetail(normToolName, toolCall.args);
12959
- label2 = `\u2714 Elevating SubAgent${detail2 ? `: ${detail2}` : ""}`;
12960
- } else if (normToolName === "get_progress") {
13108
+ label = `\u2714 Invoked Background-Agent${detail2 ? `: ${detail2}` : ""}`;
13109
+ } else if (normToolName === "get_progress" || normToolName === "GetProgress") {
12961
13110
  const detail2 = getToolDetail(normToolName, toolCall.args);
12962
- label2 = `\u2714 Checked${detail2 ? `: ${detail2}` : ""}`;
13111
+ label = `\u2714 Checked${detail2 ? `: ${detail2}` : ""}`;
13112
+ } else if (normToolName === "cancel") {
13113
+ const detail2 = getToolDetail(normToolName, toolCall.args);
13114
+ label = `\u2298 Cancelled${detail2 ? `: ${detail2}` : ""}`;
12963
13115
  } else if (normToolName === "await") {
12964
13116
  const { time } = parseArgs(toolCall.args);
12965
13117
  let sec = parseFloat(time) || 0;
@@ -12973,11 +13125,11 @@ ${ideErr} [/ERROR]`;
12973
13125
  }
12974
13126
  return `${s}s`;
12975
13127
  };
12976
- label2 = `\u2714 Awaiting \u2192 ${formatTime(sec)}`;
13128
+ label = `\u2714 Awaiting \u2192 ${formatTime(sec)}`;
12977
13129
  } else if (normToolName === "exec_command" || normToolName === "ask") {
12978
- label2 = "";
13130
+ label = "";
12979
13131
  } else {
12980
- label2 = `Executed: ${toolCall.toolName}`;
13132
+ label = `Executed: ${toolCall.toolName}`;
12981
13133
  }
12982
13134
  yield* flushGoogleBuffer2();
12983
13135
  if (normToolName === "exec_command") {
@@ -13119,7 +13271,7 @@ ${ideErr} [/ERROR]`;
13119
13271
  const denyMsg = `Access Denied. You are not allowed to access files outside the current workspace.`;
13120
13272
  if (normToolName === "write_file" || normToolName === "update_file") {
13121
13273
  const action = normToolName === "write_file" ? "Write Canceled" : "Edit Canceled";
13122
- const deniedLabel = `\u2717 ${action}: ${parsedArgs.path || "..."}`;
13274
+ const deniedLabel = `\u2718 ${action}: ${parsedArgs.path || "..."}`;
13123
13275
  let terminalWidth = 115;
13124
13276
  if (process.stdout.isTTY) {
13125
13277
  terminalWidth = process.stdout.columns - 5 || 120;
@@ -13529,7 +13681,7 @@ ${boxMid}`) };
13529
13681
  }
13530
13682
  if (normToolName === "write_file" || normToolName === "update_file") {
13531
13683
  const action = normToolName === "write_file" ? "Write Cancelled" : "Edit Denied";
13532
- const deniedLabel = `\u2717 ${action}: ${parseArgs(toolCall.args).path || "..."}`.toUpperCase();
13684
+ const deniedLabel = `\u2718 ${action}: ${parseArgs(toolCall.args).path || "..."}`.toUpperCase();
13533
13685
  let terminalWidth = 115;
13534
13686
  if (process.stdout.isTTY) {
13535
13687
  terminalWidth = process.stdout.columns - 5 || 120;
@@ -13555,13 +13707,13 @@ ${boxMid}`) };
13555
13707
  }
13556
13708
  }
13557
13709
  }
13558
- if (label2) {
13710
+ if (label) {
13559
13711
  let terminalWidth = 115;
13560
13712
  if (process.stdout.isTTY) {
13561
13713
  terminalWidth = process.stdout.columns - 5 || 120;
13562
13714
  }
13563
- const boxWidth = Math.min(label2.length + 4, terminalWidth);
13564
- const boxMid = `${label2.padEnd(boxWidth - 2).substring(0, boxWidth - 2)}`;
13715
+ const boxWidth = Math.min(label.length + 4, terminalWidth);
13716
+ const boxMid = `${label.padEnd(boxWidth - 2).substring(0, boxWidth - 2)}`;
13565
13717
  const boxBottom = ` ${" ".repeat(boxWidth)} `;
13566
13718
  yield { type: "visual_feedback", content: colorMainWords(`
13567
13719
  ${boxMid}${boxMid.includes("Created") || boxMid.includes("Edited") || boxMid.includes("Written") ? "" : `
@@ -13719,7 +13871,7 @@ ${colorMainWords(output)}` };
13719
13871
  anyToolExecutedInThisTurn = true;
13720
13872
  let uiContent = `[TOOL RESULT]: ${result || ""}`;
13721
13873
  if (normToolName === "view_file" || normToolName === "web_scrape" || normToolName === "file_map") {
13722
- uiContent = `[TOOL RESULT]: ${label2} (Context Locked for UI Clarity)`;
13874
+ uiContent = `[TOOL RESULT]: ${label} (Context Locked for UI Clarity)`;
13723
13875
  }
13724
13876
  yield { type: "tool_result", content: uiContent, aiContent, binaryPart, toolName: normToolName };
13725
13877
  if (normToolName === "memory" && result.includes("SUCCESS")) yield { type: "memory_updated" };
@@ -14067,7 +14219,12 @@ TOOL POLICY:
14067
14219
  - Want spefific STRING across project/file? SearchKeyword >> Guessing/ReadFile
14068
14220
  - HUGE FILES? SearchKeyword >> FileMap/Full Read
14069
14221
  -- PROVIDED TOOLS --
14070
- ${Object.values(SUBAGENT_TOOL_DEFINITIONS).join("\n")}`;
14222
+ ${Object.values(SUBAGENT_TOOL_DEFINITIONS).join("\n")}
14223
+
14224
+ - VERIFY TOOL RESULT CONTENTS. Fix errors. No hallucinations
14225
+ - Escape quotes: \\" for code strings
14226
+ - Literal escapes: Double-escape sequences (e.g., \\\\n)
14227
+ - File structure: Real newlines for code formatting`.trim();
14071
14228
  const systemInstruction = `=== START SYSTEM PROMPT ===
14072
14229
  You are a subagent helping the main FluxFlow CLI agent
14073
14230
  Your task is: "${task}"
@@ -14089,6 +14246,13 @@ Current Time: ${(/* @__PURE__ */ new Date()).toLocaleString("en-US", { year: "nu
14089
14246
  let turn = 0;
14090
14247
  let finalAnswer = "";
14091
14248
  while (turn < maxTurns) {
14249
+ if (settings?.taskId && typeof subagentProgress !== "undefined") {
14250
+ const taskObj = subagentProgress.find((t) => t.id === settings.taskId);
14251
+ if (taskObj && taskObj.status === "cancelled") {
14252
+ if (logCallback) logCallback(`[SUBAGENT CANCELLED] Subagent task was cancelled.`);
14253
+ throw new Error("Subagent task was cancelled.");
14254
+ }
14255
+ }
14092
14256
  const contents = subagentHistory.map((m) => ({
14093
14257
  role: m.role === "user" ? "user" : "model",
14094
14258
  parts: [{ text: m.text }]
@@ -14108,6 +14272,12 @@ ${cleanResponse}
14108
14272
  }
14109
14273
  let toolResultsStr = "";
14110
14274
  for (const toolCall of toolCalls) {
14275
+ if (settings?.taskId && typeof subagentProgress !== "undefined") {
14276
+ const taskObj = subagentProgress.find((t) => t.id === settings.taskId);
14277
+ if (taskObj && taskObj.status === "cancelled") {
14278
+ throw new Error("Subagent task was cancelled.");
14279
+ }
14280
+ }
14111
14281
  const normalizedToolName = toolCall.toolName.toLowerCase();
14112
14282
  const allowed = allowedTools ? allowedTools.some((t) => t.toLowerCase() === normalizedToolName) : true;
14113
14283
  if (!allowed) {
@@ -14119,33 +14289,28 @@ ${cleanResponse}
14119
14289
  `;
14120
14290
  continue;
14121
14291
  }
14122
- let label2 = "";
14123
- if (normalizedToolName === "web_search") {
14124
- const { query, limit = 10 } = parseArgs(toolCall.args);
14125
- label2 = `\u2714 \x1B[95mSearched\x1B[0m: ${query} \u2192 ${limit}`;
14126
- } else if (normalizedToolName === "web_scrape") {
14127
- const url = parseArgs(toolCall.args).url || "...";
14128
- label2 = `\u2714 \x1B[95mVisited\x1B[0m: ${url}`;
14129
- } else if (normalizedToolName === "view_file") {
14130
- const { path: targetPath } = parseArgs(toolCall.args);
14131
- label2 = `\u2714 \x1B[95mRead\x1B[0m: ${targetPath}`;
14132
- } else if (normalizedToolName === "list_files" || normalizedToolName === "read_folder") {
14133
- const path21 = parseArgs(toolCall.args).path || "...";
14134
- label2 = `\u2714 \x1B[95mViewed\x1B[0m: ${path21}`;
14292
+ let label = "";
14293
+ if (normalizedToolName === "web_search" || normalizedToolName === "websearch") {
14294
+ label = `\u2714 \x1B[95mSearched\x1B[0m`;
14295
+ } else if (normalizedToolName === "web_scrape" || normalizedToolName === "webscrape") {
14296
+ label = `\u2714 \x1B[95mScraped\x1B[0m`;
14297
+ } else if (normalizedToolName === "view_file" || normalizedToolName === "viewfile" || normalizedToolName === "readfile") {
14298
+ label = `\u2714 \x1B[95mRead File\x1B[0m`;
14299
+ } else if (normalizedToolName === "list_files" || normalizedToolName === "read_folder" || normalizedToolName === "readfolder") {
14300
+ label = `\u2714 \x1B[95mBrowsed Folder\x1B[0m`;
14135
14301
  } else if (normalizedToolName === "write_file" || normalizedToolName === "writefile") {
14136
14302
  const path21 = parseArgs(toolCall.args).path || "...";
14137
- label2 = `\u2714 \x1B[95mCreated\x1B[0m: ${path21}`;
14138
- } else if (normalizedToolName === "update_file" || normalizedToolName === "updatefile" || normalizedToolName === "patchfile" || normalizedToolName === "patch_file") {
14303
+ label = `\u2714 \x1B[95mFile Created\x1B[0m: ${path21}`;
14304
+ } else if (normalizedToolName === "update_file" || normalizedToolName === "updatefile" || normalizedToolName === "patchfile" || normalizedToolName === "patch_file" || normalizedToolName === "patchfile" || normalizedToolName === "updatefile") {
14139
14305
  const path21 = parseArgs(toolCall.args).path || "...";
14140
- label2 = `\u2714 \x1B[95mEdited\x1B[0m: ${path21}`;
14141
- } else if (normalizedToolName === "file_map") {
14142
- const path21 = parseArgs(toolCall.args).path || "...";
14143
- label2 = `\u2714 \x1B[95mGet Map\x1B[0m: ${path21}`;
14306
+ label = `\u2714 \x1B[95mFile Edited\x1B[0m: ${path21}`;
14307
+ } else if (normalizedToolName === "file_map" || normalizedToolName === "filemap") {
14308
+ label = `\u2714 \x1B[95mIndexed\x1B[0m`;
14144
14309
  } else if (normalizedToolName === "await") {
14145
14310
  const { time } = parseArgs(toolCall.args);
14146
14311
  let sec = parseFloat(time) || 0;
14147
- if (sec < 5) sec = 5;
14148
- if (sec > 120) sec = 120;
14312
+ if (sec < 10) sec = 10;
14313
+ if (sec > 180) sec = 180;
14149
14314
  const formatTime = (s) => {
14150
14315
  if (s >= 60) {
14151
14316
  const m = Math.floor(s / 60);
@@ -14154,14 +14319,14 @@ ${cleanResponse}
14154
14319
  }
14155
14320
  return `${s}s`;
14156
14321
  };
14157
- label2 = `\u2714 \x1B[95mAwaiting\x1B[0m \u2192 ${formatTime(sec)}`;
14322
+ label = `\u2714 \x1B[95mAwaiting\x1B[0m \u2192 ${formatTime(sec)}`;
14158
14323
  } else {
14159
14324
  const displayLabel = TOOL_LABELS2[normalizedToolName] || toolCall.toolName;
14160
14325
  const detail = getToolDetail(normalizedToolName, toolCall.args);
14161
- label2 = `\u2714 \x1B[95m${displayLabel}\x1B[0m${detail ? `: ${detail}` : ""}`;
14326
+ label = `\u2714 \x1B[95m${displayLabel}\x1B[0m${detail ? `: ${detail}` : ""}`;
14162
14327
  }
14163
- if (settings.onVisualFeedback && label2) {
14164
- settings.onVisualFeedback(label2);
14328
+ if (settings.onVisualFeedback && label) {
14329
+ settings.onVisualFeedback(label);
14165
14330
  }
14166
14331
  if (logCallback) logCallback(`[Executing Tool] ${toolCall.toolName}(${toolCall.args})...`);
14167
14332
  try {
@@ -16486,6 +16651,10 @@ function App({ args = [] }) {
16486
16651
  cmd: "z-ai/glm-5.1",
16487
16652
  desc: "Text Only [DEPRICATED]"
16488
16653
  },
16654
+ {
16655
+ cmd: "z-ai/glm-5.2",
16656
+ desc: "Text Only"
16657
+ },
16489
16658
  // --- MiniMax Family ---
16490
16659
  {
16491
16660
  cmd: "minimaxai/minimax-m2.7",
@@ -17369,7 +17538,7 @@ ${list || "No saved chats found."}`, isMeta: true }];
17369
17538
  setInput("");
17370
17539
  const cleanCount = messages.filter((m) => (m.role === "user" || m.role === "agent" || m.role === "system") && !String(m.id).startsWith("welcome") && !m.isMeta).length;
17371
17540
  const tokens = sessionStats?.tokens || 0;
17372
- if (cleanCount < 100 || tokens < 32768) {
17541
+ if (cleanCount < 64 || tokens < 32768) {
17373
17542
  const s2 = emojiSpace(2);
17374
17543
  setMessages((prev) => {
17375
17544
  setCompletedIndex(prev.length + 1);
@@ -17547,7 +17716,7 @@ ${timestamp}` };
17547
17716
  });
17548
17717
  },
17549
17718
  onSubagentUpdate: () => {
17550
- setActiveSubagents([...subagentProgress]);
17719
+ setActiveSubagents(subagentProgress.map((sa) => ({ ...sa })));
17551
17720
  },
17552
17721
  onExecStart: (cmd) => {
17553
17722
  setActiveCommand(cmd);
@@ -18259,8 +18428,8 @@ Selection: ${val}`,
18259
18428
  });
18260
18429
  setActiveView("input");
18261
18430
  }, [activeView, providerBudgetCursor]);
18262
- const CustomMenuItem = ({ label: label2, isSelected }) => {
18263
- const isCancel = label2 === "Cancel" || label2 === "Back" || label2.toLowerCase().includes("exit") || label2.toLowerCase().includes("back");
18431
+ const CustomMenuItem = ({ label, isSelected }) => {
18432
+ const isCancel = label === "Cancel" || label === "Back" || label.toLowerCase().includes("exit") || label.toLowerCase().includes("back");
18264
18433
  return /* @__PURE__ */ React15.createElement(
18265
18434
  Box14,
18266
18435
  {
@@ -18269,10 +18438,10 @@ Selection: ${val}`,
18269
18438
  paddingX: 1,
18270
18439
  width: "100%"
18271
18440
  },
18272
- /* @__PURE__ */ React15.createElement(Text15, { color: isSelected ? "white" : "gray", bold: isSelected }, isSelected ? "\u276F " : " ", label2)
18441
+ /* @__PURE__ */ React15.createElement(Text15, { color: isSelected ? "white" : "gray", bold: isSelected }, isSelected ? "\u276F " : " ", label)
18273
18442
  );
18274
18443
  };
18275
- const renderProgressBar = (label2, current, limit) => {
18444
+ const renderProgressBar = (label, current, limit) => {
18276
18445
  const percent = limit > 0 ? Math.min(100, Math.round(current / limit * 100)) : 0;
18277
18446
  const barWidth = 15;
18278
18447
  const filledCount = Math.round(percent / 100 * barWidth);
@@ -18283,10 +18452,10 @@ Selection: ${val}`,
18283
18452
  } else if (percent > 80) {
18284
18453
  barColor = "red";
18285
18454
  }
18286
- const isTokens = label2.toLowerCase().includes("token");
18455
+ const isTokens = label.toLowerCase().includes("token");
18287
18456
  const displayLimit = shouldClearValue(limit) ? "\u221E" : isTokens ? formatTokens(limit) : limit;
18288
18457
  const displayCurrent = isTokens ? formatTokens(current) : current;
18289
- return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "row", paddingLeft: 4, key: label2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 18 }, /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, label2, ": ")), /* @__PURE__ */ React15.createElement(Text15, { color: barColor }, barStr), /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, " ", percent, "% (", displayCurrent, "/", displayLimit, ")"));
18458
+ return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "row", paddingLeft: 4, key: label }, /* @__PURE__ */ React15.createElement(Box14, { width: 18 }, /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, label, ": ")), /* @__PURE__ */ React15.createElement(Text15, { color: barColor }, barStr), /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, " ", percent, "% (", displayCurrent, "/", displayLimit, ")"));
18290
18459
  };
18291
18460
  const renderActiveView = () => {
18292
18461
  switch (activeView) {
@@ -18702,7 +18871,7 @@ Selection: ${val}`,
18702
18871
  return /* @__PURE__ */ React15.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__ */ React15.createElement(Box14, { flexDirection: "column" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "30-DAY MODEL TOKEN BREAKDOWN"), !monthlyUsage?.models || Object.keys(monthlyUsage.models).length === 0 ? /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey", italic: true }, "No model token usage recorded in the last 30 days.")) : Object.entries(monthlyUsage.models).map(([provider, models]) => {
18703
18872
  const providerTotalTokens = Object.values(models).reduce((sum, m) => sum + (m.tokens || 0), 0);
18704
18873
  return /* @__PURE__ */ React15.createElement(Box14, { key: provider, flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 40 }, /* @__PURE__ */ React15.createElement(Text15, { color: "cyan", bold: true }, provider, ":")), /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true }, formatTokens(providerTotalTokens))), Object.entries(models).map(([modelName, stats]) => /* @__PURE__ */ React15.createElement(Box14, { key: modelName, flexDirection: "column", marginLeft: 4, marginTop: 1 }, /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 36 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "\xBB ", modelName, ":")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(stats.tokens || 0))), /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React15.createElement(Box14, { width: 32 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens((stats.tokens || 0) - (stats.candidateTokens || 0)))), (stats.cachedTokens || 0) > 0 && /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 5 }, /* @__PURE__ */ React15.createElement(Box14, { width: 31 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(stats.cachedTokens))), /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React15.createElement(Box14, { width: 32 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(stats.candidateTokens || 0))))));
18705
- })) : /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, { marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "SESSION TELEMETRY")), /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column" }, /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Session Duration:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(Date.now() - SESSION_START_TIME))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Model Requests:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, sessionAgentCalls)), /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 23 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB API Time:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(sessionApiTime))), /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 23 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Tool Time:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(sessionToolTime))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Memory Agent:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, sessionBackgroundCalls)), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Tokens Consumed:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalTokens))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Active Context:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionStats.tokens))), sessionTotalTokens > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 23 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalTokens - sessionTotalCandidateTokens))), sessionTotalCachedTokens > 0 && /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React15.createElement(Box14, { width: 21 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalCachedTokens))), sessionTotalCandidateTokens > 0 && /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 23 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalCandidateTokens)))), sessionImageCount > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Images Made:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, sessionImageCount)), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Image Credits:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, Number(((sessionImageCredits || 0) * 1e3).toFixed(0)), " credits"))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Code Changes (Sess):")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, /* @__PURE__ */ React15.createElement(Text15, { color: "green" }, "+", linesAdded), " ", /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "-", linesRemoved))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Tool Calls (Sess):")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, sessionToolSuccess + sessionToolFailure + sessionToolDenied, " ( "), /* @__PURE__ */ React15.createElement(Text15, { color: "green" }, "\u2713 ", sessionToolSuccess), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " "), /* @__PURE__ */ React15.createElement(Text15, { color: "yellow" }, "\u2298 ", sessionToolDenied), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " "), /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "\u2715 ", sessionToolFailure), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " )"))), /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, trackerTitle), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, timeLabel)), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatDuration(u?.duration || 0))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Model Requests:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, u?.agent || 0)), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Memory Agent:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, u?.background || 0)), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, tokensLabel)), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(u?.tokens || 0))), (u?.tokens || 0) > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 23 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens((u?.tokens || 0) - (u?.candidateTokens || 0)))), (u?.cachedTokens || 0) > 0 && /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React15.createElement(Box14, { width: 21 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(u.cachedTokens))), (u?.candidateTokens || 0) > 0 && /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 23 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(u.candidateTokens)))), (u?.imageCalls?.length || 0) > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, imagesLabel)), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, u.imageCalls.length)), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, imageCreditsLabel)), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, Number(((u.imageCalls.reduce((sum, c) => sum + c.cost, 0) || 0) * 1e3).toFixed(0)), " credits"))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, codeChangesLabel)), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, /* @__PURE__ */ React15.createElement(Text15, { color: "green" }, "+", u?.linesAdded || 0), " ", /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "-", u?.linesRemoved || 0))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, toolCallsLabel)), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, (u?.toolSuccess || 0) + (u?.toolFailure || 0) + (u?.toolDenied || 0), " ( "), /* @__PURE__ */ React15.createElement(Text15, { color: "green" }, "\u2713 ", u?.toolSuccess || 0), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " "), /* @__PURE__ */ React15.createElement(Text15, { color: "yellow" }, "\u2298 ", u?.toolDenied || 0), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " "), /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "\u2715 ", u?.toolFailure || 0), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " )")))), /* @__PURE__ */ React15.createElement(Text15, { dimColor: true, marginTop: 1, italic: true }, "(Press TAB to toggle Daily/Monthly views, SPACE for Model Breakdown, ESC to return)"));
18874
+ })) : /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, { marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "SESSION TELEMETRY")), /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column" }, /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Session Duration:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(Date.now() - SESSION_START_TIME))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Model Requests:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, sessionAgentCalls)), /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 23 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB API Time:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(sessionApiTime))), /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 23 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Tool Time:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(sessionToolTime))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Memory Agent:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, sessionBackgroundCalls)), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Tokens Consumed:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalTokens))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Active Context:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionStats.tokens))), sessionTotalTokens > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 23 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalTokens - sessionTotalCandidateTokens))), sessionTotalCachedTokens > 0 && /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React15.createElement(Box14, { width: 21 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalCachedTokens))), sessionTotalCandidateTokens > 0 && /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 23 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalCandidateTokens)))), sessionImageCount > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Images Made:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, sessionImageCount)), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Image Credits:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, Number(((sessionImageCredits || 0) * 1e3).toFixed(0)), " credits"))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Code Changes (Sess):")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, /* @__PURE__ */ React15.createElement(Text15, { color: "green" }, "+", linesAdded), " ", /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "-", linesRemoved))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Tool Calls (Sess):")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, sessionToolSuccess + sessionToolFailure + sessionToolDenied, " ( "), /* @__PURE__ */ React15.createElement(Text15, { color: "green" }, "\u2714 ", sessionToolSuccess), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " "), /* @__PURE__ */ React15.createElement(Text15, { color: "yellow" }, "\u2298 ", sessionToolDenied), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " "), /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "\u2718 ", sessionToolFailure), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " )"))), /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, trackerTitle), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, timeLabel)), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatDuration(u?.duration || 0))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Model Requests:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, u?.agent || 0)), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Memory Agent:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, u?.background || 0)), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, tokensLabel)), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(u?.tokens || 0))), (u?.tokens || 0) > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 23 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens((u?.tokens || 0) - (u?.candidateTokens || 0)))), (u?.cachedTokens || 0) > 0 && /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React15.createElement(Box14, { width: 21 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(u.cachedTokens))), (u?.candidateTokens || 0) > 0 && /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 23 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(u.candidateTokens)))), (u?.imageCalls?.length || 0) > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, imagesLabel)), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, u.imageCalls.length)), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, imageCreditsLabel)), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, Number(((u.imageCalls.reduce((sum, c) => sum + c.cost, 0) || 0) * 1e3).toFixed(0)), " credits"))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, codeChangesLabel)), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, /* @__PURE__ */ React15.createElement(Text15, { color: "green" }, "+", u?.linesAdded || 0), " ", /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "-", u?.linesRemoved || 0))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 25 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, toolCallsLabel)), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, (u?.toolSuccess || 0) + (u?.toolFailure || 0) + (u?.toolDenied || 0), " ( "), /* @__PURE__ */ React15.createElement(Text15, { color: "green" }, "\u2714 ", u?.toolSuccess || 0), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " "), /* @__PURE__ */ React15.createElement(Text15, { color: "yellow" }, "\u2298 ", u?.toolDenied || 0), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " "), /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "\u2718 ", u?.toolFailure || 0), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " )")))), /* @__PURE__ */ React15.createElement(Text15, { dimColor: true, marginTop: 1, italic: true }, "(Press TAB to toggle Daily/Monthly views, SPACE for Model Breakdown, ESC to return)"));
18706
18875
  }
18707
18876
  case "autoExecDanger":
18708
18877
  return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "grey", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "SECURITY WARNING: YOLO MODE"), /* @__PURE__ */ React15.createElement(Text15, { marginTop: 1 }, "Turning this ON allows the agent to execute terminal commands automatically without requiring your approval for each step."), /* @__PURE__ */ React15.createElement(Text15, { marginTop: 1, color: "white" }, "RISKS INVOLVED:"), /* @__PURE__ */ React15.createElement(Text15, null, "\u2022 The agent may execute destructive commands (rm -rf, etc.) by mistake unless specified in sandbox rules."), /* @__PURE__ */ React15.createElement(Text15, null, "\u2022 Unintended system changes if the agent hallucinates a path or command."), /* @__PURE__ */ React15.createElement(Text15, null, "\u2022 Reduced control over the agent's step-by-step decision making."), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(
@@ -19217,18 +19386,18 @@ Selection: ${val}`,
19217
19386
  },
19218
19387
  /* @__PURE__ */ React15.createElement(Box14, { paddingX: 1, marginBottom: 0, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true }, suggestions[0]?.cmd?.startsWith("@") ? "FILE SUGGESTIONS" : "COMMAND SUGGESTIONS"), suggestions[0]?.cmd?.startsWith("@") ? /* @__PURE__ */ React15.createElement(Text15, { color: "gray", italic: true }, "(Use '#Lstart-Lend' to specify line numbers)") : input.startsWith("/model") && apiTier === "Free" ? (() => {
19219
19388
  let url = "https://aistudio.google.com/billing";
19220
- let label2 = "billing";
19389
+ let label = "billing";
19221
19390
  if (aiProvider === "DeepSeek") {
19222
19391
  url = "https://platform.deepseek.com/usage";
19223
- label2 = "billing";
19392
+ label = "billing";
19224
19393
  } else if (aiProvider === "OpenRouter") {
19225
19394
  url = "https://openrouter.ai/settings/profile";
19226
- label2 = "profile";
19395
+ label = "profile";
19227
19396
  } else if (aiProvider === "NVIDIA") {
19228
19397
  url = "https://build.nvidia.com/settings/api-keys";
19229
- label2 = "billing";
19398
+ label = "billing";
19230
19399
  }
19231
- return /* @__PURE__ */ React15.createElement(Text15, { color: "gray", dimColor: true, italic: true }, "Paid API Strategy has more models. Configure ", /* @__PURE__ */ React15.createElement(Text15, { color: "cyan", underline: true }, `\x1B]8;;${url}\x07${label2}\x1B]8;;\x07`), " & /settings");
19400
+ return /* @__PURE__ */ React15.createElement(Text15, { color: "gray", dimColor: true, italic: true }, "Paid API Strategy has more models. Configure ", /* @__PURE__ */ React15.createElement(Text15, { color: "cyan", underline: true }, `\x1B]8;;${url}\x07${label}\x1B]8;;\x07`), " & /settings");
19232
19401
  })() : null),
19233
19402
  visible.map((s, i) => {
19234
19403
  const actualIdx = startIdx + i;
@@ -19282,7 +19451,7 @@ Selection: ${val}`,
19282
19451
  const agentActiveMs = sessionApiTime + sessionToolTime;
19283
19452
  const apiPercent = agentActiveMs > 0 ? (sessionApiTime / agentActiveMs * 100).toFixed(1) : "0.0";
19284
19453
  const toolPercent = agentActiveMs > 0 ? (sessionToolTime / agentActiveMs * 100).toFixed(1) : "0.0";
19285
- return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "round", paddingX: 3, paddingY: 1, borderColor: "grey", width: Math.min(100, (stdout?.columns || 100) - 2), marginTop: 0, marginBottom: 0 }, /* @__PURE__ */ React15.createElement(Box14, { marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Text15, { bold: true }, gradient2(["blue", "purple"])("Agent powering down. Goodbye!"))), /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "Interaction Summary"), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Session ID:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, chatId)), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Tool Calls:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, sessionToolSuccess + sessionToolFailure + sessionToolDenied, " ( ", /* @__PURE__ */ React15.createElement(Text15, { color: "green" }, "\u2713 ", sessionToolSuccess), " ", /* @__PURE__ */ React15.createElement(Text15, { color: "yellow" }, "\u2298 ", sessionToolDenied), " ", /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "\u2715 ", sessionToolFailure), " )")), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Success Rate:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, successRate, "%")), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Code Changes:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, /* @__PURE__ */ React15.createElement(Text15, { color: "green" }, "+", linesAdded), " ", /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "-", linesRemoved))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Tokens Consumed:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalTokens))), sessionTotalTokens > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 18 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalTokens - sessionTotalCandidateTokens))), sessionTotalCachedTokens > 0 && /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React15.createElement(Box14, { width: 16 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalCachedTokens))), sessionTotalCandidateTokens > 0 && /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 18 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalCandidateTokens)))), sessionImageCount > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Images Made:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, sessionImageCount)), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Image Credits:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, Number(((sessionImageCredits || 0) * 1e3).toFixed(0)), " credits")))), /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "Performance"), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Wall Time:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(wallTimeMs))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Agent Active:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(agentActiveMs))), /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 18 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB API Time:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(sessionApiTime), " (", apiPercent, "%)")), /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 18 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Tool Time:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(sessionToolTime), " (", toolPercent, "%)"))));
19454
+ return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "round", paddingX: 3, paddingY: 1, borderColor: "grey", width: Math.min(100, (stdout?.columns || 100) - 2), marginTop: 0, marginBottom: 0 }, /* @__PURE__ */ React15.createElement(Box14, { marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Text15, { bold: true }, gradient2(["blue", "purple"])("Agent powering down. Goodbye!"))), /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "Interaction Summary"), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Session ID:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, chatId)), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Tool Calls:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, sessionToolSuccess + sessionToolFailure + sessionToolDenied, " ( ", /* @__PURE__ */ React15.createElement(Text15, { color: "green" }, "\u2714 ", sessionToolSuccess), " ", /* @__PURE__ */ React15.createElement(Text15, { color: "yellow" }, "\u2298 ", sessionToolDenied), " ", /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "\u2718 ", sessionToolFailure), " )")), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Success Rate:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, successRate, "%")), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Code Changes:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, /* @__PURE__ */ React15.createElement(Text15, { color: "green" }, "+", linesAdded), " ", /* @__PURE__ */ React15.createElement(Text15, { color: "red" }, "-", linesRemoved))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Tokens Consumed:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalTokens))), sessionTotalTokens > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 18 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalTokens - sessionTotalCandidateTokens))), sessionTotalCachedTokens > 0 && /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React15.createElement(Box14, { width: 16 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalCachedTokens))), sessionTotalCandidateTokens > 0 && /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 18 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatTokens(sessionTotalCandidateTokens)))), sessionImageCount > 0 && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Images Made:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, sessionImageCount)), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Image Credits:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, Number(((sessionImageCredits || 0) * 1e3).toFixed(0)), " credits")))), /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "Performance"), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Wall Time:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(wallTimeMs))), /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Box14, { width: 20 }, /* @__PURE__ */ React15.createElement(Text15, { color: "blue" }, "Agent Active:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(agentActiveMs))), /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 18 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB API Time:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(sessionApiTime), " (", apiPercent, "%)")), /* @__PURE__ */ React15.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React15.createElement(Box14, { width: 18 }, /* @__PURE__ */ React15.createElement(Text15, { color: "grey" }, "\xBB Tool Time:")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, formatMsDuration(sessionToolTime), " (", toolPercent, "%)"))));
19286
19455
  })())));
19287
19456
  }
19288
19457
  var shouldClearValue, getPrefilledValue, getIDEName, getIDEDirName, getKeybindingsPath, parseJsonc, hasShiftEnterBinding, getPromoOptions, BridgePromo, SESSION_START_TIME, CHANGELOG_URL, DOCS_URL, linesAdded, linesRemoved, packageJsonPath, packageJson, versionFluxflow, updatedOn, ResolutionModal, parseAgentText, getProjectFiles, cachedShortcut, getLatencyColor2, SubagentRow;
@@ -19604,7 +19773,7 @@ var init_app = __esm({
19604
19773
  const timer = setInterval(checkLatency, 100);
19605
19774
  return () => clearInterval(timer);
19606
19775
  }, [sa.status, sa.lastChunkTime]);
19607
- return /* @__PURE__ */ React15.createElement(Box14, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " \u2022 ", sa.title, " ", /* @__PURE__ */ React15.createElement(Text15, { color: "white", dimColor: true }, "(", sa.id, ")")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, "Executing: ", /* @__PURE__ */ React15.createElement(Text15, { color: "white", dimColor: true, bold: true }, sa.currentTool || "Active"), /* @__PURE__ */ React15.createElement(Text15, { color: dotColor }, " \u25CF")));
19776
+ return /* @__PURE__ */ React15.createElement(Box14, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, " \u2022 ", sa.title, " ", /* @__PURE__ */ React15.createElement(Text15, { color: "white", dimColor: true }, "(", sa.id, ")")), /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", dimColor: true, bold: true }, sa.currentTool || "Active"), /* @__PURE__ */ React15.createElement(Text15, { color: dotColor }, " \u25CF")));
19608
19777
  });
19609
19778
  }
19610
19779
  });
@@ -19771,8 +19940,8 @@ if (isBundled && !process.execArgv.some((arg) => arg.includes("max-old-space-siz
19771
19940
  { label: "Bun", value: "bun" },
19772
19941
  { label: "Custom Command", value: "custom" }
19773
19942
  ];
19774
- const CustomItem2 = ({ label: label2, isSelected }) => {
19775
- return /* @__PURE__ */ React17.createElement(Box15, { width: "100%" }, /* @__PURE__ */ React17.createElement(Text16, { bold: isSelected }, "\u2514\u2500 ", isSelected ? "\x1B[32m\u25CF\x1B[0m" : "\u25CB", " ", label2));
19943
+ const CustomItem2 = ({ label, isSelected }) => {
19944
+ return /* @__PURE__ */ React17.createElement(Box15, { width: "100%" }, /* @__PURE__ */ React17.createElement(Text16, { bold: isSelected }, "\u2514\u2500 ", isSelected ? "\x1B[32m\u25CF\x1B[0m" : "\u25CB", " ", label));
19776
19945
  };
19777
19946
  let unmountFn;
19778
19947
  const PromptComponent = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "3.0.12",
3
+ "version": "3.0.14",
4
4
  "date": "2026-07-04",
5
5
  "description": "A High-Fidelity Agentic CLI with Sub-Agents for the Flux Era.",
6
6
  "keywords": [