fluxflow-cli 1.8.4 → 1.8.6

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 +76 -8
  2. package/package.json +1 -1
package/dist/fluxflow.js CHANGED
@@ -1052,6 +1052,20 @@ var init_usage = __esm({
1052
1052
  if (!isDirty || !cachedUsage) return;
1053
1053
  try {
1054
1054
  await fs5.ensureDir(path5.dirname(USAGE_FILE));
1055
+ let diskData = null;
1056
+ try {
1057
+ if (await fs5.exists(USAGE_FILE)) {
1058
+ diskData = await fs5.readJson(USAGE_FILE);
1059
+ }
1060
+ } catch (e) {
1061
+ }
1062
+ if (diskData && diskData.date === cachedUsage.date && diskData.stats) {
1063
+ for (const key in cachedUsage.stats) {
1064
+ if (diskData.stats[key] !== void 0) {
1065
+ cachedUsage.stats[key] = Math.max(cachedUsage.stats[key], diskData.stats[key]);
1066
+ }
1067
+ }
1068
+ }
1055
1069
  const tempFile = USAGE_FILE + ".tmp";
1056
1070
  await fs5.writeJson(tempFile, cachedUsage, { spaces: 2 });
1057
1071
  const fd = await fs5.open(tempFile, "r+");
@@ -1072,6 +1086,7 @@ var init_usage = __esm({
1072
1086
  await flushUsage();
1073
1087
  writeTimeout = null;
1074
1088
  }, delay);
1089
+ if (writeTimeout.unref) writeTimeout.unref();
1075
1090
  };
1076
1091
  initUsage = async () => {
1077
1092
  cachedUsage = await loadUsageFromFile();
@@ -1596,7 +1611,11 @@ var init_view_file = __esm({
1596
1611
  "src/tools/view_file.js"() {
1597
1612
  init_arg_parser();
1598
1613
  view_file = async (args) => {
1599
- const { path: targetPath, start_line = 1, end_line = 500 } = parseArgs(args);
1614
+ let { path: targetPath, StartLine, EndLine, start_line, end_line } = parseArgs(args);
1615
+ const sLine = parseInt(StartLine || start_line);
1616
+ const eLine = parseInt(EndLine || end_line);
1617
+ const finalStart = sLine || 1;
1618
+ const finalEnd = eLine || (sLine ? sLine + 800 : 800);
1600
1619
  if (!targetPath) return 'ERROR: Missing "path" argument for view_file.';
1601
1620
  const absolutePath = path9.resolve(process.cwd(), targetPath);
1602
1621
  try {
@@ -1639,8 +1658,8 @@ var init_view_file = __esm({
1639
1658
  content = content.replace(/\\n/g, "[/n]");
1640
1659
  const lines = content.split("\n");
1641
1660
  const totalLines = lines.length;
1642
- const start = Math.max(0, start_line - 1);
1643
- const end = Math.min(totalLines, end_line);
1661
+ const start = Math.max(0, finalStart - 1);
1662
+ const end = Math.min(totalLines, finalEnd);
1644
1663
  const resultLines = lines.slice(start, end);
1645
1664
  const header = `File: [${targetPath}] (Showing lines ${start + 1}-${end} of ${totalLines})`;
1646
1665
  const code = resultLines.map((line, i) => `${String(start + i + 1).padStart(4)}: ${line}`).join("\n");
@@ -2564,6 +2583,26 @@ var init_ai = __esm({
2564
2583
  config: {
2565
2584
  systemInstruction: currentSystemInstruction,
2566
2585
  temperature: mode === "Flux" ? 1 : 1.3,
2586
+ maxOutputTokens: 32768,
2587
+ mediaResolution: "MEDIA_RESOLUTION_MEDIUM",
2588
+ safetySettings: [
2589
+ {
2590
+ category: HarmCategory.HARM_CATEGORY_HARASSMENT,
2591
+ threshold: HarmBlockThreshold.BLOCK_NONE
2592
+ },
2593
+ {
2594
+ category: HarmCategory.HARM_CATEGORY_HATE_SPEECH,
2595
+ threshold: HarmBlockThreshold.BLOCK_NONE
2596
+ },
2597
+ {
2598
+ category: HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT,
2599
+ threshold: HarmBlockThreshold.BLOCK_NONE
2600
+ },
2601
+ {
2602
+ category: HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT,
2603
+ threshold: HarmBlockThreshold.BLOCK_NONE
2604
+ }
2605
+ ],
2567
2606
  thinkingConfig: {
2568
2607
  includeThoughts: false,
2569
2608
  thinkingLevel: ThinkingLevel.MINIMAL
@@ -2636,9 +2675,11 @@ var init_ai = __esm({
2636
2675
  const url = parseArgs(toolCall.args).url || "...";
2637
2676
  label = `\u{1F4D6} READING SITE: ${url}`.toUpperCase();
2638
2677
  } else if (toolCall.toolName === "view_file") {
2639
- const { path: targetPath2, start_line = 1, end_line = 500 } = parseArgs(toolCall.args);
2678
+ const { path: targetPath2, StartLine, EndLine, start_line, end_line } = parseArgs(toolCall.args);
2679
+ const sLine = parseInt(StartLine || start_line) || 1;
2680
+ const eLine = parseInt(EndLine || end_line) || (StartLine || start_line ? sLine + 800 : 800);
2640
2681
  let totalLines = "...";
2641
- let actualEndLine = end_line;
2682
+ let actualEndLine = eLine;
2642
2683
  try {
2643
2684
  const absPath = path16.resolve(process.cwd(), targetPath2);
2644
2685
  if (fs16.existsSync(absPath)) {
@@ -2657,7 +2698,7 @@ var init_ai = __esm({
2657
2698
  } else if (isImage) {
2658
2699
  label = `\u{1F4F8} ANALYZING IMAGE: ${targetPath2}`.toUpperCase();
2659
2700
  } else {
2660
- label = `\u{1F4C4} READING FILE: ${targetPath2}. LINES ${start_line} - ${actualEndLine} FROM ${totalLines}`.toUpperCase();
2701
+ label = `\u{1F4C4} READING FILE: ${targetPath2}. LINES ${sLine} - ${actualEndLine} FROM ${totalLines}`.toUpperCase();
2661
2702
  }
2662
2703
  } else if (toolCall.toolName === "list_files" || toolCall.toolName === "read_folder") {
2663
2704
  const action = toolCall.toolName === "list_files" ? "LISTING" : "DISCOVERING";
@@ -2829,6 +2870,24 @@ ${boxBottom}
2829
2870
  config: {
2830
2871
  maxOutputTokens: 512,
2831
2872
  temperature: 0.69,
2873
+ safetySettings: [
2874
+ {
2875
+ category: HarmCategory.HARM_CATEGORY_HARASSMENT,
2876
+ threshold: HarmBlockThreshold.BLOCK_NONE
2877
+ },
2878
+ {
2879
+ category: HarmCategory.HARM_CATEGORY_HATE_SPEECH,
2880
+ threshold: HarmBlockThreshold.BLOCK_NONE
2881
+ },
2882
+ {
2883
+ category: HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT,
2884
+ threshold: HarmBlockThreshold.BLOCK_NONE
2885
+ },
2886
+ {
2887
+ category: HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT,
2888
+ threshold: HarmBlockThreshold.BLOCK_NONE
2889
+ }
2890
+ ],
2832
2891
  thinkingConfig: {
2833
2892
  includeThoughts: false,
2834
2893
  thinkingLevel: ThinkingLevel.MINIMAL
@@ -3085,6 +3144,7 @@ var init_UpdateProcessor = __esm({
3085
3144
  const [log, setLog] = useState6("");
3086
3145
  const [error, setError] = useState6(null);
3087
3146
  useEffect4(() => {
3147
+ let child;
3088
3148
  const runUpdate = async () => {
3089
3149
  const manager = settings.updateManager || "npm";
3090
3150
  if (!settings.updateManager) {
@@ -3099,7 +3159,7 @@ var init_UpdateProcessor = __esm({
3099
3159
  else command = `npm install -g fluxflow-cli@${latest}`;
3100
3160
  setStatus("downloading");
3101
3161
  setLog(`Running: ${command}...`);
3102
- const child = exec2(command, (err, stdout, stderr) => {
3162
+ child = exec2(command, (err, stdout, stderr) => {
3103
3163
  if (err) {
3104
3164
  setError(stderr || err.message);
3105
3165
  setStatus("error");
@@ -3113,6 +3173,14 @@ var init_UpdateProcessor = __esm({
3113
3173
  });
3114
3174
  };
3115
3175
  runUpdate();
3176
+ return () => {
3177
+ if (child) {
3178
+ try {
3179
+ child.kill();
3180
+ } catch (e) {
3181
+ }
3182
+ }
3183
+ };
3116
3184
  }, []);
3117
3185
  if (status === "initializing" || status === "downloading") {
3118
3186
  return /* @__PURE__ */ React9.createElement(Box9, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React9.createElement(Box9, null, /* @__PURE__ */ React9.createElement(Text9, { color: "cyan" }, /* @__PURE__ */ React9.createElement(Spinner, { type: "dots" })), /* @__PURE__ */ React9.createElement(Text9, { marginLeft: 1, bold: true }, " Updating Flux Flow to v", latest, "...")), /* @__PURE__ */ React9.createElement(Box9, { marginTop: 1, paddingX: 1, borderStyle: "single", borderColor: "#333" }, /* @__PURE__ */ React9.createElement(Text9, { color: "gray", dimColor: true, italic: true }, log || "Preparing environment...")), /* @__PURE__ */ React9.createElement(Text9, { marginTop: 1, dimColor: true }, "(Please do not close the terminal)"));
@@ -4795,7 +4863,7 @@ var init_app = __esm({
4795
4863
  init_text();
4796
4864
  SESSION_START_TIME = Date.now();
4797
4865
  CHANGELOG_URL = "https://fluxflow-cli.onrender.com/changelog.html";
4798
- versionFluxflow = "1.8.4";
4866
+ versionFluxflow = "1.8.6";
4799
4867
  updatedOn = "2026-05-08";
4800
4868
  ResolutionModal = ({ data, onResolve, onEdit }) => /* @__PURE__ */ React10.createElement(Box10, { flexDirection: "column", borderStyle: "round", borderColor: "magenta", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React10.createElement(Text10, { color: "magenta", bold: true, underline: true }, "\u{1F7E3} STEERING HINT RESOLUTION"), /* @__PURE__ */ React10.createElement(Text10, { marginTop: 1 }, "The agent already finished the task before your hint was consumed."), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1, backgroundColor: "#222", paddingX: 1, width: "100%" }, /* @__PURE__ */ React10.createElement(Text10, { italic: true, color: "gray" }, '"', data, '"')), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: "cyan" }, "How would you like to proceed?")), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1 }, /* @__PURE__ */ React10.createElement(
4801
4869
  CommandMenu,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "1.8.4",
3
+ "version": "1.8.6",
4
4
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
5
5
  "keywords": [
6
6
  "ai",