fluxflow-cli 1.18.9 → 1.18.11

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 +102 -62
  2. package/package.json +2 -2
package/dist/fluxflow.js CHANGED
@@ -584,7 +584,8 @@ var init_ChatLayout = __esm({
584
584
  return /* @__PURE__ */ React3.createElement(Text3, { color, wrap: "anywhere" }, parts.map((part, j) => {
585
585
  if (!part) return null;
586
586
  if (part.startsWith("```") && part.endsWith("```")) {
587
- return /* @__PURE__ */ React3.createElement(CodeRenderer, { key: j, text: part });
587
+ const content = part.slice(3, -3);
588
+ return /* @__PURE__ */ React3.createElement(Text3, { key: j, color: "cyan", backgroundColor: "#003333" }, " ", content, " ");
588
589
  }
589
590
  if (part.startsWith("**") && part.endsWith("**")) {
590
591
  return /* @__PURE__ */ React3.createElement(Text3, { key: j, bold: true, color: "white" }, /* @__PURE__ */ React3.createElement(InlineMarkdown, { text: part.slice(2, -2), color: "white" }));
@@ -4810,19 +4811,19 @@ var init_ai = __esm({
4810
4811
  TERMINATION_SIGNAL = true;
4811
4812
  };
4812
4813
  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",
4814
+ "write_file": "Writing",
4815
+ "update_file": "Editing",
4816
+ "read_folder": "Reading",
4817
+ "view_file": "Reading",
4818
+ "exec_command": "Executing Command",
4819
+ "web_search": "Searching",
4820
+ "web_scrape": "Reading",
4820
4821
  "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"
4822
+ "search_keyword": "Searching",
4823
+ "ask": "User Input",
4824
+ "write_pdf": "Creating",
4825
+ "write_docx": "Creating",
4826
+ "generate_image": "Generating"
4826
4827
  };
4827
4828
  getToolDetail = (toolName, argsStr) => {
4828
4829
  try {
@@ -5430,7 +5431,7 @@ ${newMemoryListStr}
5430
5431
  else if (totalFolders > 1024) dynamicMaxDepth = 4;
5431
5432
  else if (totalFolders > 512) dynamicMaxDepth = 6;
5432
5433
  else if (totalFolders > 256) dynamicMaxDepth = 7;
5433
- let dirStructure = totalFolders > 6144 ? `FileSystem Depth exceeded for indexing` : process.cwd() + "\n" + getDirTree(process.cwd(), dynamicMaxDepth);
5434
+ let dirStructure = totalFolders > 6144 ? `FileSystem length exceeded for indexing` : process.cwd() + "\n" + getDirTree(process.cwd(), dynamicMaxDepth);
5434
5435
  const firstUserMsg = `[SYSTEM METADATA (PRIORITY: DYNAMIC)] Time: ${dateTimeStr} | v${versionFluxflow2}
5435
5436
  CWD: ${process.cwd()}
5436
5437
  **DIRECTORY STRUCTURE**
@@ -5659,20 +5660,20 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITI
5659
5660
  yield { type: "status", content: `${currentLabel}...` };
5660
5661
  if (process.stdout.isTTY) {
5661
5662
  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",
5663
+ "web_search": "Searching",
5664
+ "web_scrape": "Reading",
5665
+ "view_file": "Reading",
5666
+ "read_folder": "Reading",
5667
+ "list_files": "Reading",
5668
+ "write_file": "Writing",
5669
+ "update_file": "Editing",
5670
+ "write_pdf": "Creating",
5671
+ "write_docx": "Creating",
5672
+ "search_keyword": "Searching",
5673
+ "exec_command": "Executing",
5674
+ "ask": "User Input",
5674
5675
  "memory": "Updating Memory",
5675
- "generate_image": "Generating Image"
5676
+ "generate_image": "Generating"
5676
5677
  };
5677
5678
  const toolTitle = TOOL_TITLES[potentialTool] || "Working";
5678
5679
  process.stdout.write(`\x1B]0;${toolTitle}...\x07`);
@@ -5795,10 +5796,10 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITI
5795
5796
  let label = "";
5796
5797
  if (normToolName === "web_search") {
5797
5798
  const { query, limit = 10 } = parseArgs(toolCall.args);
5798
- label = `\u{1F50D} SEARCHED: "${query}" (${limit})`.toUpperCase();
5799
+ label = `\u{1F50D} Searched: ${query}`;
5799
5800
  } else if (normToolName === "web_scrape") {
5800
5801
  const url = parseArgs(toolCall.args).url || "...";
5801
- label = `\u{1F4D6} READ SITE: ${url}`.toUpperCase();
5802
+ label = `\u{1F4D6} Visited: ${url}`;
5802
5803
  } else if (normToolName === "view_file") {
5803
5804
  const { path: targetPath2, StartLine, EndLine, start_line, end_line, startLine, endLine } = parseArgs(toolCall.args);
5804
5805
  const rawStart = StartLine || start_line || startLine;
@@ -5819,34 +5820,35 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITI
5819
5820
  }
5820
5821
  const pathLower = targetPath2.toLowerCase();
5821
5822
  const isPdf = pathLower.endsWith(".pdf");
5823
+ const isOfficeFile = pathLower.endsWith(".docx") || pathLower.endsWith(".doc") || pathLower.endsWith(".ppt") || pathLower.endsWith(".pptx") || pathLower.endsWith(".xls") || pathLower.endsWith(".xlsx");
5822
5824
  const isImage = /\.(png|jpg|jpeg|webp|gif|bmp)$/.test(pathLower);
5823
- if (isPdf) {
5824
- label = `\u{1F4C4} ANALYZED PDF: ${targetPath2}`.toUpperCase();
5825
+ if (isPdf || isOfficeFile) {
5826
+ label = `\u{1F4C4} Viewed: ${targetPath2}`;
5825
5827
  } else if (isImage) {
5826
- label = `\u{1F4F8} ANALYZED IMAGE: ${targetPath2}`.toUpperCase();
5828
+ label = `\u{1F4F8} Viewed: ${targetPath2}`;
5827
5829
  } else {
5828
- label = `\u{1F4C4} ANALYZED FILE: ${targetPath2} | LINES: ${sLine}-${actualEndLine} OF ${totalLines}`.toUpperCase();
5830
+ label = `\u{1F4C4} Read: ${targetPath2} \u2192 Lines ${sLine} - ${actualEndLine} of ${totalLines}`;
5829
5831
  }
5830
5832
  } 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();
5833
+ const action = normToolName === "list_files" ? "List" : "Viewed";
5834
+ const path17 = parseArgs(toolCall.args).path;
5835
+ label = `\u{1F4C2} ${action}: ${path17 === "." ? "./" : path17}`;
5833
5836
  } 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();
5837
+ const action = normToolName === "write_file" ? "Created" : "Edited";
5838
+ label = `\u{1F4BE} ${action}: ${parseArgs(toolCall.args).path || "..."}`;
5836
5839
  } else if (normToolName === "write_pdf") {
5837
- label = `\u{1F4D1} PDF CREATED: ${parseArgs(toolCall.args).path || "..."}`.toUpperCase();
5840
+ label = `\u{1F4D1} Created: ${parseArgs(toolCall.args).path || "..."}`;
5838
5841
  } else if (normToolName === "write_docx") {
5839
- label = `\u{1F4DD} DOCX CREATED: ${parseArgs(toolCall.args).path || "..."}`.toUpperCase();
5842
+ label = `\u{1F4DD} Created: ${parseArgs(toolCall.args).path || "..."}`;
5840
5843
  } else if (normToolName === "search_keyword") {
5841
- const { keyword } = parseArgs(toolCall.args);
5842
- label = `\u{1F50E} KEYWORD SEARCHED: "${keyword}"`.toUpperCase();
5844
+ label = "";
5843
5845
  } else if (normToolName === "generate_image") {
5844
5846
  const { path: argPath, outputPath, output } = parseArgs(toolCall.args);
5845
- label = `\u{1F3A8} IMAGE GENERATED: ${argPath || outputPath || output || "generated_image.png"}`.toUpperCase();
5847
+ label = `\u{1F3A8} Generated: ${argPath || outputPath || output || "generated_image.png"}`;
5846
5848
  } else if (normToolName === "exec_command" || normToolName === "ask") {
5847
5849
  label = "";
5848
5850
  } else {
5849
- label = `EXECUTED: ${toolCall.toolName}`.toUpperCase();
5851
+ label = `Executed: ${toolCall.toolName}`;
5850
5852
  }
5851
5853
  if (normToolName === "exec_command") {
5852
5854
  const { command } = parseArgs(toolCall.args);
@@ -5886,8 +5888,8 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITI
5886
5888
  if (isExternalOff && !absoluteTarget.startsWith(absoluteCwd)) {
5887
5889
  const denyMsg = `Access Denied. You are not allowed to access files outside the current workspace.`;
5888
5890
  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();
5891
+ const action = normToolName === "write_file" ? "Write Canceled" : "Edit Canceled";
5892
+ const deniedLabel = `\u{1F4BE} ${action}: ${parsedArgs.path || "..."}`;
5891
5893
  const boxWidth = Math.min(deniedLabel.length + 4, 115);
5892
5894
  const boxTop = `\u256D${"\u2500".repeat(boxWidth)}\u256E`;
5893
5895
  const boxMid = `\u2502 ${deniedLabel.padEnd(boxWidth - 2).substring(0, boxWidth - 2)} \u2502`;
@@ -6041,6 +6043,24 @@ ${boxBottom}` };
6041
6043
  binaryPart = result.binaryPart;
6042
6044
  result = result.text;
6043
6045
  }
6046
+ if (normToolName === "search_keyword") {
6047
+ const { keyword, file } = parseArgs(toolCall.args);
6048
+ let matchCount = 0;
6049
+ if (result) {
6050
+ const m = result.match(/Found (\d+) matches/i);
6051
+ if (m) {
6052
+ matchCount = parseInt(m[1]);
6053
+ }
6054
+ }
6055
+ const postLabel = `\u{1F50E} Searched: "${keyword}"${file ? ` in "${file}"` : " ./"} \u2192 ${matchCount} Match${matchCount === 1 ? "" : "es"}`;
6056
+ const boxWidth = Math.min(postLabel.length + 4, 115);
6057
+ const boxTop = `\u256D${"\u2500".repeat(boxWidth)}\u256E`;
6058
+ const boxMid = `\u2502 ${postLabel.padEnd(boxWidth - 2).substring(0, boxWidth - 2)} \u2502`;
6059
+ const boxBottom = `\u2570${"\u2500".repeat(boxWidth)}\u256F`;
6060
+ yield { type: "visual_feedback", content: `${boxTop}
6061
+ ${boxMid}
6062
+ ${boxBottom}` };
6063
+ }
6044
6064
  if (normToolName === "exec_command" && settings.onExecEnd) {
6045
6065
  await new Promise((resolve) => setTimeout(resolve, 800));
6046
6066
  settings.onExecEnd();
@@ -6933,6 +6953,7 @@ function App({ args = [] }) {
6933
6953
  const [queuedPrompt, setQueuedPrompt] = useState10(null);
6934
6954
  const [resolutionData, setResolutionData] = useState10(null);
6935
6955
  const [tempModelOverride, setTempModelOverride] = useState10(null);
6956
+ useEffect7(() => setEscPressCount(0), [input]);
6936
6957
  const [messages, setMessages] = useState10(() => {
6937
6958
  const logoMsg = { id: "logo-" + Date.now(), role: "system", text: FLUX_LOGO, isLogo: true, isMeta: true };
6938
6959
  const welcomeMsg = { id: "welcome", role: "system", text: "\u{1F30A}\u26A1 Welcome to Flux Flow! Type /help for commands.", isMeta: true };
@@ -7093,7 +7114,7 @@ function App({ args = [] }) {
7093
7114
  const nextCount = prev + 1;
7094
7115
  if (nextCount === 1) {
7095
7116
  if (escDoubleTimerRef.current) clearTimeout(escDoubleTimerRef.current);
7096
- escDoubleTimerRef.current = setTimeout(() => setEscPressCount(0), 1e3);
7117
+ escDoubleTimerRef.current = setTimeout(() => setEscPressCount(0), 2e3);
7097
7118
  } else if (nextCount === 2) {
7098
7119
  if (escDoubleTimerRef.current) clearTimeout(escDoubleTimerRef.current);
7099
7120
  setEscPressCount(0);
@@ -7825,16 +7846,28 @@ ${hintText}`, color: "magenta" }];
7825
7846
  }
7826
7847
  }
7827
7848
  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
- });
7849
+ try {
7850
+ fs18.writeFileSync(exportPath, fileContent, "utf8");
7851
+ setMessages((prev) => {
7852
+ setCompletedIndex(prev.length + 1);
7853
+ return [...prev, {
7854
+ id: Date.now(),
7855
+ role: "system",
7856
+ text: `\u{1F4E4} [EXPORT] Chat exported successfully to "${exportFile}"`,
7857
+ isMeta: true
7858
+ }];
7859
+ });
7860
+ } catch (err) {
7861
+ setMessages((prev) => {
7862
+ setCompletedIndex(prev.length + 1);
7863
+ return [...prev, {
7864
+ id: Date.now(),
7865
+ role: "system",
7866
+ text: `\u274C [EXPORT ERROR] Failed to export chat: ${err.message}`,
7867
+ isMeta: true
7868
+ }];
7869
+ });
7870
+ }
7838
7871
  break;
7839
7872
  }
7840
7873
  case "/chats": {
@@ -7930,11 +7963,18 @@ ${list || "No saved chats found."}`, isMeta: true }];
7930
7963
  return [...prev, { id: "init-err-" + Date.now(), role: "system", text: "\u274C ERROR: FluxFlow.md already exists in this directory.", isMeta: true }];
7931
7964
  });
7932
7965
  } 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
- });
7966
+ try {
7967
+ fs18.writeFileSync(filePath, template);
7968
+ setMessages((prev) => {
7969
+ setCompletedIndex(prev.length + 1);
7970
+ 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 }];
7971
+ });
7972
+ } catch (err) {
7973
+ setMessages((prev) => {
7974
+ setCompletedIndex(prev.length + 1);
7975
+ return [...prev, { id: "init-err-" + Date.now(), role: "system", text: `\u274C ERROR: Failed to initialize FluxFlow.md: ${err.message}`, isMeta: true }];
7976
+ });
7977
+ }
7938
7978
  }
7939
7979
  } else {
7940
7980
  setMessages((prev) => {
@@ -8916,7 +8956,7 @@ Selection: ${val}`,
8916
8956
  }
8917
8957
  )));
8918
8958
  default:
8919
- return /* @__PURE__ */ React13.createElement(Box13, { flexDirection: "column", marginTop: 1, flexShrink: 0, width: "100%" }, /* @__PURE__ */ React13.createElement(Box13, { paddingX: 1, marginBottom: 0, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React13.createElement(Box13, null, statusText ? /* @__PURE__ */ React13.createElement(Box13, null, isSpinnerActive && /* @__PURE__ */ React13.createElement(StatusSpinner, null), /* @__PURE__ */ React13.createElement(Text13, { color: "magenta", bold: true, italic: true }, isSpinnerActive ? " " : "", statusText.toUpperCase())) : /* @__PURE__ */ React13.createElement(Text13, { color: "cyan", dimColor: true, italic: true }, "READY FOR COMMAND...")), /* @__PURE__ */ React13.createElement(Box13, null, /* @__PURE__ */ React13.createElement(Text13, { color: "gray", bold: true }, "[ "), /* @__PURE__ */ React13.createElement(Text13, { color: "white" }, tempModelOverride || activeModel), /* @__PURE__ */ React13.createElement(Text13, { color: "gray", bold: true }, " ]"))), /* @__PURE__ */ React13.createElement(
8959
+ return /* @__PURE__ */ React13.createElement(Box13, { flexDirection: "column", marginTop: 1, flexShrink: 0, width: "100%" }, /* @__PURE__ */ React13.createElement(Box13, { paddingX: 1, marginBottom: 0, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React13.createElement(Box13, null, statusText ? /* @__PURE__ */ React13.createElement(Box13, null, isSpinnerActive && /* @__PURE__ */ React13.createElement(StatusSpinner, null), /* @__PURE__ */ React13.createElement(Text13, { color: "magenta", bold: true, italic: true }, isSpinnerActive ? " " : "", statusText.toUpperCase())) : /* @__PURE__ */ React13.createElement(Text13, { color: "cyan", dimColor: true, italic: true }, " ", input.length > 0 && escPressCount ? "Press ESC again to clear input" : "READY FOR COMMAND...")), /* @__PURE__ */ React13.createElement(Box13, null, /* @__PURE__ */ React13.createElement(Text13, { color: "gray", bold: true }, "[ "), /* @__PURE__ */ React13.createElement(Text13, { color: "white" }, tempModelOverride || activeModel), /* @__PURE__ */ React13.createElement(Text13, { color: "gray", bold: true }, " ]"))), /* @__PURE__ */ React13.createElement(
8920
8960
  Box13,
8921
8961
  {
8922
8962
  borderStyle: "round",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "1.18.9",
4
- "date": "2026-05-30",
3
+ "version": "1.18.11",
4
+ "date": "2026-05-31",
5
5
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
6
6
  "keywords": [
7
7
  "ai",