fluxflow-cli 1.18.9 → 1.18.10

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 +97 -59
  2. package/package.json +1 -1
package/dist/fluxflow.js CHANGED
@@ -4810,19 +4810,19 @@ var init_ai = __esm({
4810
4810
  TERMINATION_SIGNAL = true;
4811
4811
  };
4812
4812
  TOOL_LABELS2 = {
4813
- "write_file": "Writing File",
4814
- "update_file": "Updating File",
4815
- "read_folder": "Listing Directory",
4816
- "view_file": "Reading File",
4817
- "exec_command": "Running Command",
4818
- "web_search": "Searching Web",
4819
- "web_scrape": "Reading Site",
4813
+ "write_file": "Writing",
4814
+ "update_file": "Editing",
4815
+ "read_folder": "Reading",
4816
+ "view_file": "Reading",
4817
+ "exec_command": "Executing Command",
4818
+ "web_search": "Searching",
4819
+ "web_scrape": "Reading",
4820
4820
  "memory": "Updating Memory",
4821
- "search_keyword": "Finding Files",
4822
- "ask": "Asking User",
4823
- "write_pdf": "Creating PDF",
4824
- "write_docx": "Creating Document",
4825
- "generate_image": "Generating Image"
4821
+ "search_keyword": "Searching",
4822
+ "ask": "User Input",
4823
+ "write_pdf": "Creating",
4824
+ "write_docx": "Creating",
4825
+ "generate_image": "Generating"
4826
4826
  };
4827
4827
  getToolDetail = (toolName, argsStr) => {
4828
4828
  try {
@@ -5430,7 +5430,7 @@ ${newMemoryListStr}
5430
5430
  else if (totalFolders > 1024) dynamicMaxDepth = 4;
5431
5431
  else if (totalFolders > 512) dynamicMaxDepth = 6;
5432
5432
  else if (totalFolders > 256) dynamicMaxDepth = 7;
5433
- let dirStructure = totalFolders > 6144 ? `FileSystem Depth exceeded for indexing` : process.cwd() + "\n" + getDirTree(process.cwd(), dynamicMaxDepth);
5433
+ let dirStructure = totalFolders > 6144 ? `FileSystem length exceeded for indexing` : process.cwd() + "\n" + getDirTree(process.cwd(), dynamicMaxDepth);
5434
5434
  const firstUserMsg = `[SYSTEM METADATA (PRIORITY: DYNAMIC)] Time: ${dateTimeStr} | v${versionFluxflow2}
5435
5435
  CWD: ${process.cwd()}
5436
5436
  **DIRECTORY STRUCTURE**
@@ -5659,20 +5659,20 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITI
5659
5659
  yield { type: "status", content: `${currentLabel}...` };
5660
5660
  if (process.stdout.isTTY) {
5661
5661
  const TOOL_TITLES = {
5662
- "web_search": "Searching Web",
5663
- "web_scrape": "Reading Website",
5664
- "view_file": "Reading File",
5665
- "read_folder": "Listing Folder",
5666
- "list_files": "Listing Folder",
5667
- "write_file": "Writing File",
5668
- "update_file": "Updating File",
5669
- "write_pdf": "Creating PDF",
5670
- "write_docx": "Creating Word Doc",
5671
- "search_keyword": "Searching Keywords",
5672
- "exec_command": "Running Command",
5673
- "ask": "Asking User",
5662
+ "web_search": "Searching",
5663
+ "web_scrape": "Reading",
5664
+ "view_file": "Reading",
5665
+ "read_folder": "Reading",
5666
+ "list_files": "Reading",
5667
+ "write_file": "Writing",
5668
+ "update_file": "Editing",
5669
+ "write_pdf": "Creating",
5670
+ "write_docx": "Creating",
5671
+ "search_keyword": "Searching",
5672
+ "exec_command": "Executing",
5673
+ "ask": "User Input",
5674
5674
  "memory": "Updating Memory",
5675
- "generate_image": "Generating Image"
5675
+ "generate_image": "Generating"
5676
5676
  };
5677
5677
  const toolTitle = TOOL_TITLES[potentialTool] || "Working";
5678
5678
  process.stdout.write(`\x1B]0;${toolTitle}...\x07`);
@@ -5795,10 +5795,10 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITI
5795
5795
  let label = "";
5796
5796
  if (normToolName === "web_search") {
5797
5797
  const { query, limit = 10 } = parseArgs(toolCall.args);
5798
- label = `\u{1F50D} SEARCHED: "${query}" (${limit})`.toUpperCase();
5798
+ label = `\u{1F50D} Searched: ${query}`;
5799
5799
  } else if (normToolName === "web_scrape") {
5800
5800
  const url = parseArgs(toolCall.args).url || "...";
5801
- label = `\u{1F4D6} READ SITE: ${url}`.toUpperCase();
5801
+ label = `\u{1F4D6} Visited: ${url}`;
5802
5802
  } else if (normToolName === "view_file") {
5803
5803
  const { path: targetPath2, StartLine, EndLine, start_line, end_line, startLine, endLine } = parseArgs(toolCall.args);
5804
5804
  const rawStart = StartLine || start_line || startLine;
@@ -5819,34 +5819,35 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITI
5819
5819
  }
5820
5820
  const pathLower = targetPath2.toLowerCase();
5821
5821
  const isPdf = pathLower.endsWith(".pdf");
5822
+ const isOfficeFile = pathLower.endsWith(".docx") || pathLower.endsWith(".doc") || pathLower.endsWith(".ppt") || pathLower.endsWith(".pptx") || pathLower.endsWith(".xls") || pathLower.endsWith(".xlsx");
5822
5823
  const isImage = /\.(png|jpg|jpeg|webp|gif|bmp)$/.test(pathLower);
5823
- if (isPdf) {
5824
- label = `\u{1F4C4} ANALYZED PDF: ${targetPath2}`.toUpperCase();
5824
+ if (isPdf || isOfficeFile) {
5825
+ label = `\u{1F4C4} Viewed: ${targetPath2}`;
5825
5826
  } else if (isImage) {
5826
- label = `\u{1F4F8} ANALYZED IMAGE: ${targetPath2}`.toUpperCase();
5827
+ label = `\u{1F4F8} Viewed: ${targetPath2}`;
5827
5828
  } else {
5828
- label = `\u{1F4C4} ANALYZED FILE: ${targetPath2} | LINES: ${sLine}-${actualEndLine} OF ${totalLines}`.toUpperCase();
5829
+ label = `\u{1F4C4} Read: ${targetPath2} | ${sLine}-${actualEndLine} from ${totalLines} lines`;
5829
5830
  }
5830
5831
  } else if (normToolName === "list_files" || normToolName === "read_folder") {
5831
- const action = normToolName === "list_files" ? "LIST" : "ANALYSED";
5832
- label = `\u{1F4C2} ${action} FOLDER: ${parseArgs(toolCall.args).path || "."}`.toUpperCase();
5832
+ const action = normToolName === "list_files" ? "List" : "Viewed";
5833
+ const path17 = parseArgs(toolCall.args).path;
5834
+ label = `\u{1F4C2} ${action}: ${path17 === "." ? "./" : path17}`;
5833
5835
  } else if (normToolName === "write_file" || normToolName === "update_file") {
5834
- const action = normToolName === "write_file" ? "WRITTEN" : "PATCHED";
5835
- label = `\u{1F4BE} ${action}: ${parseArgs(toolCall.args).path || "..."}`.toUpperCase();
5836
+ const action = normToolName === "write_file" ? "Created" : "Edited";
5837
+ label = `\u{1F4BE} ${action}: ${parseArgs(toolCall.args).path || "..."}`;
5836
5838
  } else if (normToolName === "write_pdf") {
5837
- label = `\u{1F4D1} PDF CREATED: ${parseArgs(toolCall.args).path || "..."}`.toUpperCase();
5839
+ label = `\u{1F4D1} Created: ${parseArgs(toolCall.args).path || "..."}`;
5838
5840
  } else if (normToolName === "write_docx") {
5839
- label = `\u{1F4DD} DOCX CREATED: ${parseArgs(toolCall.args).path || "..."}`.toUpperCase();
5841
+ label = `\u{1F4DD} Created: ${parseArgs(toolCall.args).path || "..."}`;
5840
5842
  } else if (normToolName === "search_keyword") {
5841
- const { keyword } = parseArgs(toolCall.args);
5842
- label = `\u{1F50E} KEYWORD SEARCHED: "${keyword}"`.toUpperCase();
5843
+ label = "";
5843
5844
  } else if (normToolName === "generate_image") {
5844
5845
  const { path: argPath, outputPath, output } = parseArgs(toolCall.args);
5845
- label = `\u{1F3A8} IMAGE GENERATED: ${argPath || outputPath || output || "generated_image.png"}`.toUpperCase();
5846
+ label = `\u{1F3A8} Generated: ${argPath || outputPath || output || "generated_image.png"}`;
5846
5847
  } else if (normToolName === "exec_command" || normToolName === "ask") {
5847
5848
  label = "";
5848
5849
  } else {
5849
- label = `EXECUTED: ${toolCall.toolName}`.toUpperCase();
5850
+ label = `Executed: ${toolCall.toolName}`;
5850
5851
  }
5851
5852
  if (normToolName === "exec_command") {
5852
5853
  const { command } = parseArgs(toolCall.args);
@@ -5886,8 +5887,8 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITI
5886
5887
  if (isExternalOff && !absoluteTarget.startsWith(absoluteCwd)) {
5887
5888
  const denyMsg = `Access Denied. You are not allowed to access files outside the current workspace.`;
5888
5889
  if (normToolName === "write_file" || normToolName === "update_file") {
5889
- const action = normToolName === "write_file" ? "WRITE DENIED" : "UPDATE DENIED";
5890
- const deniedLabel = `\u{1F4BE} ${action}: ${parsedArgs.path || "..."}`.toUpperCase();
5890
+ const action = normToolName === "write_file" ? "Write Canceled" : "Edit Canceled";
5891
+ const deniedLabel = `\u{1F4BE} ${action}: ${parsedArgs.path || "..."}`;
5891
5892
  const boxWidth = Math.min(deniedLabel.length + 4, 115);
5892
5893
  const boxTop = `\u256D${"\u2500".repeat(boxWidth)}\u256E`;
5893
5894
  const boxMid = `\u2502 ${deniedLabel.padEnd(boxWidth - 2).substring(0, boxWidth - 2)} \u2502`;
@@ -6041,6 +6042,24 @@ ${boxBottom}` };
6041
6042
  binaryPart = result.binaryPart;
6042
6043
  result = result.text;
6043
6044
  }
6045
+ if (normToolName === "search_keyword") {
6046
+ const { keyword, file } = parseArgs(toolCall.args);
6047
+ let matchCount = 0;
6048
+ if (result) {
6049
+ const m = result.match(/Found (\d+) matches/i);
6050
+ if (m) {
6051
+ matchCount = parseInt(m[1]);
6052
+ }
6053
+ }
6054
+ const postLabel = `\u{1F50E} Searched: "${keyword}"${file ? ` in "${file}"` : " ./"} -> ${matchCount} Match${matchCount === 1 ? "" : "es"}`;
6055
+ const boxWidth = Math.min(postLabel.length + 4, 115);
6056
+ const boxTop = `\u256D${"\u2500".repeat(boxWidth)}\u256E`;
6057
+ const boxMid = `\u2502 ${postLabel.padEnd(boxWidth - 2).substring(0, boxWidth - 2)} \u2502`;
6058
+ const boxBottom = `\u2570${"\u2500".repeat(boxWidth)}\u256F`;
6059
+ yield { type: "visual_feedback", content: `${boxTop}
6060
+ ${boxMid}
6061
+ ${boxBottom}` };
6062
+ }
6044
6063
  if (normToolName === "exec_command" && settings.onExecEnd) {
6045
6064
  await new Promise((resolve) => setTimeout(resolve, 800));
6046
6065
  settings.onExecEnd();
@@ -7825,16 +7844,28 @@ ${hintText}`, color: "magenta" }];
7825
7844
  }
7826
7845
  }
7827
7846
  const fileContent = exportLines.join("\n");
7828
- fs18.writeFileSync(exportPath, fileContent, "utf8");
7829
- setMessages((prev) => {
7830
- setCompletedIndex(prev.length + 1);
7831
- return [...prev, {
7832
- id: Date.now(),
7833
- role: "system",
7834
- text: `\u{1F4E4} [EXPORT] Chat exported successfully to "${exportFile}"`,
7835
- isMeta: true
7836
- }];
7837
- });
7847
+ try {
7848
+ fs18.writeFileSync(exportPath, fileContent, "utf8");
7849
+ setMessages((prev) => {
7850
+ setCompletedIndex(prev.length + 1);
7851
+ return [...prev, {
7852
+ id: Date.now(),
7853
+ role: "system",
7854
+ text: `\u{1F4E4} [EXPORT] Chat exported successfully to "${exportFile}"`,
7855
+ isMeta: true
7856
+ }];
7857
+ });
7858
+ } catch (err) {
7859
+ setMessages((prev) => {
7860
+ setCompletedIndex(prev.length + 1);
7861
+ return [...prev, {
7862
+ id: Date.now(),
7863
+ role: "system",
7864
+ text: `\u274C [EXPORT ERROR] Failed to export chat: ${err.message}`,
7865
+ isMeta: true
7866
+ }];
7867
+ });
7868
+ }
7838
7869
  break;
7839
7870
  }
7840
7871
  case "/chats": {
@@ -7930,11 +7961,18 @@ ${list || "No saved chats found."}`, isMeta: true }];
7930
7961
  return [...prev, { id: "init-err-" + Date.now(), role: "system", text: "\u274C ERROR: FluxFlow.md already exists in this directory.", isMeta: true }];
7931
7962
  });
7932
7963
  } else {
7933
- fs18.writeFileSync(filePath, template);
7934
- setMessages((prev) => {
7935
- setCompletedIndex(prev.length + 1);
7936
- return [...prev, { id: "init-ok-" + Date.now(), role: "system", text: "\u2705 [SUCCESS] FluxFlow.md has been initialized. You can now customize it for this project.", isMeta: true }];
7937
- });
7964
+ try {
7965
+ fs18.writeFileSync(filePath, template);
7966
+ setMessages((prev) => {
7967
+ setCompletedIndex(prev.length + 1);
7968
+ return [...prev, { id: "init-ok-" + Date.now(), role: "system", text: "\u2705 [SUCCESS] FluxFlow.md has been initialized. You can now customize it for this project.", isMeta: true }];
7969
+ });
7970
+ } catch (err) {
7971
+ setMessages((prev) => {
7972
+ setCompletedIndex(prev.length + 1);
7973
+ return [...prev, { id: "init-err-" + Date.now(), role: "system", text: `\u274C ERROR: Failed to initialize FluxFlow.md: ${err.message}`, isMeta: true }];
7974
+ });
7975
+ }
7938
7976
  }
7939
7977
  } else {
7940
7978
  setMessages((prev) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "1.18.9",
3
+ "version": "1.18.10",
4
4
  "date": "2026-05-30",
5
5
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
6
6
  "keywords": [