fluxflow-cli 1.18.20 → 1.18.22
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.
- package/dist/fluxflow.js +84 -53
- package/package.json +2 -2
package/dist/fluxflow.js
CHANGED
|
@@ -4290,6 +4290,7 @@ var init_write_docx = __esm({
|
|
|
4290
4290
|
|
|
4291
4291
|
// src/tools/search_keyword.js
|
|
4292
4292
|
import { exec } from "child_process";
|
|
4293
|
+
import path13 from "path";
|
|
4293
4294
|
var search_keyword;
|
|
4294
4295
|
var init_search_keyword = __esm({
|
|
4295
4296
|
"src/tools/search_keyword.js"() {
|
|
@@ -4302,14 +4303,14 @@ var init_search_keyword = __esm({
|
|
|
4302
4303
|
let command = "";
|
|
4303
4304
|
if (file) {
|
|
4304
4305
|
if (isWindows) {
|
|
4305
|
-
command = `powershell -Command "if (Test-Path '${file}') { Select-String -Path '${file}' -Pattern '${keyword}' | Select-Object -First 150 | ForEach-Object {
|
|
4306
|
+
command = `powershell -NoProfile -Command "if (Test-Path '${file}') { Select-String -Path '${file}' -Pattern '${keyword}' -ErrorAction SilentlyContinue | Select-Object -First 150 | ForEach-Object { '{0}|{1}' -f $_.Path, $_.LineNumber } } else { Write-Error 'File not found: ${file}' }"`;
|
|
4306
4307
|
} else {
|
|
4307
4308
|
command = `grep -HnI "${keyword}" "${file}" | head -n 150`;
|
|
4308
4309
|
}
|
|
4309
4310
|
} else {
|
|
4310
4311
|
if (isWindows) {
|
|
4311
4312
|
const excludePattern = excludes.join("|").replace(/\./g, "\\.");
|
|
4312
|
-
command = `powershell -Command "Get-ChildItem -Path . -Recurse -File | Where-Object { $_.FullName -notmatch '${excludePattern}' } | Select-String -Pattern '${keyword}' | Select-Object -First 150 | ForEach-Object {
|
|
4313
|
+
command = `powershell -NoProfile -Command "Get-ChildItem -Path . -Recurse -File -ErrorAction SilentlyContinue | Where-Object { ($_.FullName -replace [regex]::Escape($pwd.Path), '') -notmatch '${excludePattern}' } | Select-String -Pattern '${keyword}' -ErrorAction SilentlyContinue | Select-Object -First 150 | ForEach-Object { '{0}|{1}' -f $_.Path, $_.LineNumber }"`;
|
|
4313
4314
|
} else {
|
|
4314
4315
|
const excludeDirArgs = excludes.map((d) => `--exclude-dir="${d}"`).join(" ");
|
|
4315
4316
|
command = `grep -rnI ${excludeDirArgs} "${keyword}" . | head -n 150`;
|
|
@@ -4328,24 +4329,54 @@ var init_search_keyword = __esm({
|
|
|
4328
4329
|
}
|
|
4329
4330
|
const rawLines = stdout.trim().split("\n").filter((l) => l.trim() !== "");
|
|
4330
4331
|
if (rawLines.length === 0) return resolve(`Found 0 matches for keyword: "${keyword}"${file ? ` in file: ${file}` : ""}`);
|
|
4331
|
-
const
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4332
|
+
const matches = rawLines.slice(0, 150).map((line) => {
|
|
4333
|
+
let filePath, lineNum;
|
|
4334
|
+
if (line.includes("|")) {
|
|
4335
|
+
const parts = line.split("|");
|
|
4336
|
+
let rawPath = parts[0];
|
|
4337
|
+
if (path13.isAbsolute(rawPath)) {
|
|
4338
|
+
rawPath = path13.relative(process.cwd(), rawPath);
|
|
4339
|
+
}
|
|
4340
|
+
filePath = rawPath.replace(/^(\.\/|\.\\)/, "").replace(/\\/g, "/");
|
|
4341
|
+
lineNum = parts[1];
|
|
4342
|
+
} else {
|
|
4343
|
+
let rawPath;
|
|
4344
|
+
const driveMatch = line.match(/^([a-zA-Z]:)/);
|
|
4345
|
+
if (driveMatch) {
|
|
4346
|
+
const startSearch = 2;
|
|
4347
|
+
const nextColon = line.indexOf(":", startSearch);
|
|
4348
|
+
const thirdColon = line.indexOf(":", nextColon + 1);
|
|
4349
|
+
if (nextColon !== -1 && thirdColon !== -1) {
|
|
4350
|
+
rawPath = line.substring(0, nextColon);
|
|
4351
|
+
lineNum = line.substring(nextColon + 1, thirdColon);
|
|
4352
|
+
}
|
|
4353
|
+
} else {
|
|
4354
|
+
const firstColon = line.indexOf(":");
|
|
4355
|
+
const secondColon = line.indexOf(":", firstColon + 1);
|
|
4356
|
+
if (firstColon !== -1 && secondColon !== -1) {
|
|
4357
|
+
rawPath = line.substring(0, firstColon);
|
|
4358
|
+
lineNum = line.substring(firstColon + 1, secondColon);
|
|
4359
|
+
}
|
|
4360
|
+
}
|
|
4361
|
+
if (!rawPath || !lineNum) return null;
|
|
4362
|
+
if (path13.isAbsolute(rawPath)) {
|
|
4363
|
+
rawPath = path13.relative(process.cwd(), rawPath);
|
|
4364
|
+
}
|
|
4365
|
+
filePath = rawPath.replace(/^(\.\/|\.\\)/, "").replace(/\\/g, "/");
|
|
4366
|
+
lineNum = lineNum;
|
|
4367
|
+
}
|
|
4368
|
+
if (!filePath || !lineNum) return null;
|
|
4369
|
+
const lowerPath = filePath.toLowerCase();
|
|
4370
|
+
const isNoise = excludes.some((ex) => lowerPath.split("/").includes(ex.toLowerCase()));
|
|
4371
|
+
if (isNoise) return null;
|
|
4342
4372
|
return `${filePath} ${lineNum}`;
|
|
4343
4373
|
}).filter(Boolean);
|
|
4344
|
-
|
|
4374
|
+
if (matches.length === 0) return resolve(`Found 0 matches for keyword: "${keyword}"${file ? ` in file: ${file}` : ""}`);
|
|
4375
|
+
let output = `Found ${matches.length} matches:
|
|
4345
4376
|
|
|
4346
4377
|
`;
|
|
4347
4378
|
output += matches.join("\n");
|
|
4348
|
-
if (
|
|
4379
|
+
if (matches.length > 150) {
|
|
4349
4380
|
output += "\n\n... (Truncated to first 150 matches)";
|
|
4350
4381
|
}
|
|
4351
4382
|
resolve(output);
|
|
@@ -4357,7 +4388,7 @@ var init_search_keyword = __esm({
|
|
|
4357
4388
|
|
|
4358
4389
|
// src/utils/settings.js
|
|
4359
4390
|
import fs14 from "fs-extra";
|
|
4360
|
-
import
|
|
4391
|
+
import path14 from "path";
|
|
4361
4392
|
var DEFAULT_SETTINGS, loadSettings, migrateToExternal, saveSettings;
|
|
4362
4393
|
var init_settings = __esm({
|
|
4363
4394
|
"src/utils/settings.js"() {
|
|
@@ -4444,8 +4475,8 @@ var init_settings = __esm({
|
|
|
4444
4475
|
const { FLUXFLOW_DIR: FLUXFLOW_DIR2 } = await Promise.resolve().then(() => (init_paths(), paths_exports));
|
|
4445
4476
|
const folders = ["logs", "secret"];
|
|
4446
4477
|
for (const folder of folders) {
|
|
4447
|
-
const src =
|
|
4448
|
-
const dest =
|
|
4478
|
+
const src = path14.join(FLUXFLOW_DIR2, folder);
|
|
4479
|
+
const dest = path14.join(newPath, folder);
|
|
4449
4480
|
try {
|
|
4450
4481
|
if (await fs14.exists(src)) {
|
|
4451
4482
|
await fs14.ensureDir(dest);
|
|
@@ -4475,7 +4506,7 @@ var init_settings = __esm({
|
|
|
4475
4506
|
if (updated.imageSettings) {
|
|
4476
4507
|
updated.imageSettings = { ...updated.imageSettings, apiKey: "" };
|
|
4477
4508
|
}
|
|
4478
|
-
await fs14.ensureDir(
|
|
4509
|
+
await fs14.ensureDir(path14.dirname(SETTINGS_FILE));
|
|
4479
4510
|
writeAesEncryptedJson(SETTINGS_FILE, updated);
|
|
4480
4511
|
return true;
|
|
4481
4512
|
} catch (err) {
|
|
@@ -4496,7 +4527,7 @@ var init_fallback_key = __esm({
|
|
|
4496
4527
|
|
|
4497
4528
|
// src/tools/generate_image.js
|
|
4498
4529
|
import fs15 from "fs-extra";
|
|
4499
|
-
import
|
|
4530
|
+
import path15 from "path";
|
|
4500
4531
|
var injectPngMetadata, generate_image;
|
|
4501
4532
|
var init_generate_image = __esm({
|
|
4502
4533
|
"src/tools/generate_image.js"() {
|
|
@@ -4676,12 +4707,12 @@ var init_generate_image = __esm({
|
|
|
4676
4707
|
"Seed": String(seed)
|
|
4677
4708
|
};
|
|
4678
4709
|
finalBuffer = injectPngMetadata(finalBuffer, metadata);
|
|
4679
|
-
const absolutePath =
|
|
4680
|
-
await fs15.ensureDir(
|
|
4710
|
+
const absolutePath = path15.resolve(process.cwd(), outputPath);
|
|
4711
|
+
await fs15.ensureDir(path15.dirname(absolutePath));
|
|
4681
4712
|
await RevertManager.recordFileChange(absolutePath);
|
|
4682
4713
|
await fs15.writeFile(absolutePath, finalBuffer);
|
|
4683
4714
|
await recordImageGeneration(settings);
|
|
4684
|
-
const ext =
|
|
4715
|
+
const ext = path15.extname(outputPath).toLowerCase();
|
|
4685
4716
|
const mimeMap = {
|
|
4686
4717
|
".jpg": "image/jpeg",
|
|
4687
4718
|
".jpeg": "image/jpeg",
|
|
@@ -4871,7 +4902,7 @@ var init_tools = __esm({
|
|
|
4871
4902
|
|
|
4872
4903
|
// src/utils/ai.js
|
|
4873
4904
|
import { GoogleGenAI, ThinkingLevel, HarmBlockThreshold, HarmCategory } from "@google/genai";
|
|
4874
|
-
import
|
|
4905
|
+
import path16 from "path";
|
|
4875
4906
|
import fs16 from "fs";
|
|
4876
4907
|
var client, TERMINATION_SIGNAL, stripAnsi2, signalTermination, TOOL_LABELS2, getToolDetail, runJanitorTask, getActiveToolContext, getContextSafeText, contextSafeReplace, getSanitizedText, detectToolCalls, initAI, consolidatePastMemories, getAIStream;
|
|
4877
4908
|
var init_ai = __esm({
|
|
@@ -4913,7 +4944,7 @@ var init_ai = __esm({
|
|
|
4913
4944
|
try {
|
|
4914
4945
|
const pArgs = parseArgs(argsStr);
|
|
4915
4946
|
const filePath = pArgs.path || pArgs.targetFile || pArgs.TargetFile || pArgs.directory;
|
|
4916
|
-
return filePath ?
|
|
4947
|
+
return filePath ? path16.basename(filePath.replace(/["']/g, "").replace(/\\/g, "/")) : null;
|
|
4917
4948
|
} catch (e) {
|
|
4918
4949
|
return null;
|
|
4919
4950
|
}
|
|
@@ -5080,9 +5111,9 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
|
|
|
5080
5111
|
process.stdout.write(`\x1B]0;Finalizing Error\x07`);
|
|
5081
5112
|
}
|
|
5082
5113
|
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
5083
|
-
const janitorErrDir =
|
|
5114
|
+
const janitorErrDir = path16.join(LOGS_DIR, "janitor");
|
|
5084
5115
|
if (!fs16.existsSync(janitorErrDir)) fs16.mkdirSync(janitorErrDir, { recursive: true });
|
|
5085
|
-
fs16.appendFileSync(
|
|
5116
|
+
fs16.appendFileSync(path16.join(janitorErrDir, "error.log"), `ERROR [Attempt ${attempts}/${MAX_JANITOR_RETRIES + 1}] [${date}]: ${String(janitorErr)}
|
|
5086
5117
|
|
|
5087
5118
|
`);
|
|
5088
5119
|
if (attempts > MAX_JANITOR_RETRIES) break;
|
|
@@ -5091,8 +5122,8 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
|
|
|
5091
5122
|
}
|
|
5092
5123
|
}
|
|
5093
5124
|
if (attempts) {
|
|
5094
|
-
const janitorErrDir =
|
|
5095
|
-
fs16.appendFileSync(
|
|
5125
|
+
const janitorErrDir = path16.join(LOGS_DIR, "janitor");
|
|
5126
|
+
fs16.appendFileSync(path16.join(janitorErrDir, "error.log"), `-----------------------------------------------------------------------------
|
|
5096
5127
|
|
|
5097
5128
|
|
|
5098
5129
|
`);
|
|
@@ -5408,10 +5439,10 @@ ${newMemoryListStr}
|
|
|
5408
5439
|
}
|
|
5409
5440
|
}
|
|
5410
5441
|
} catch (err) {
|
|
5411
|
-
const janitorLogDir =
|
|
5442
|
+
const janitorLogDir = path16.join(LOGS_DIR, "janitor");
|
|
5412
5443
|
if (!fs16.existsSync(janitorLogDir)) fs16.mkdirSync(janitorLogDir, { recursive: true });
|
|
5413
5444
|
fs16.appendFileSync(
|
|
5414
|
-
|
|
5445
|
+
path16.join(janitorLogDir, "error.log"),
|
|
5415
5446
|
`[${(/* @__PURE__ */ new Date()).toLocaleString()}] Past memory batch consolidation error: ${err.message}
|
|
5416
5447
|
`
|
|
5417
5448
|
);
|
|
@@ -5615,16 +5646,16 @@ ${newMemoryListStr}
|
|
|
5615
5646
|
if (COLLAPSED_DIRS_GLOBAL.includes(entry.name)) continue;
|
|
5616
5647
|
if (entry.isDirectory()) {
|
|
5617
5648
|
currentCount.value++;
|
|
5618
|
-
countFolders(
|
|
5649
|
+
countFolders(path16.join(dir, entry.name), currentCount, depth + 1);
|
|
5619
5650
|
}
|
|
5620
5651
|
}
|
|
5621
5652
|
return currentCount.value;
|
|
5622
5653
|
};
|
|
5623
5654
|
const getDirTree = (dir, maxDepth, prefix = "", depth = 1) => {
|
|
5624
5655
|
const entries = safeReaddirWithTypes(dir);
|
|
5625
|
-
const sep =
|
|
5656
|
+
const sep = path16.sep;
|
|
5626
5657
|
if (entries.length > 100) {
|
|
5627
|
-
return `${prefix}\u2514\u2500\u2500 ${
|
|
5658
|
+
return `${prefix}\u2514\u2500\u2500 ${path16.basename(dir)}${sep} ...100+ files...
|
|
5628
5659
|
`;
|
|
5629
5660
|
}
|
|
5630
5661
|
let result = "";
|
|
@@ -5642,7 +5673,7 @@ ${newMemoryListStr}
|
|
|
5642
5673
|
];
|
|
5643
5674
|
finalItems.forEach((item, index) => {
|
|
5644
5675
|
const isLast = index === finalItems.length - 1;
|
|
5645
|
-
const filePath =
|
|
5676
|
+
const filePath = path16.join(dir, item.name);
|
|
5646
5677
|
const connector = isLast ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 ";
|
|
5647
5678
|
const childPrefix = prefix + (isLast ? " " : "\u2502 ");
|
|
5648
5679
|
if (item.isCollapsed) {
|
|
@@ -5907,12 +5938,12 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITI
|
|
|
5907
5938
|
if (keyword) {
|
|
5908
5939
|
detail = keyword.replace(/["']/g, "");
|
|
5909
5940
|
} else if (filePath) {
|
|
5910
|
-
detail =
|
|
5941
|
+
detail = path16.basename(filePath.replace(/["']/g, "").replace(/\\/g, "/"));
|
|
5911
5942
|
} else {
|
|
5912
5943
|
const m = partialArgs.match(/(?:path|targetFile|TargetFile|directory|keyword)\s*=\s*\\?["']?([^\\"' \),]+)/);
|
|
5913
5944
|
if (m) {
|
|
5914
5945
|
const val = m[1].replace(/["']/g, "");
|
|
5915
|
-
detail = potentialTool === "search_keyword" ? val :
|
|
5946
|
+
detail = potentialTool === "search_keyword" ? val : path16.basename(val.replace(/\\/g, "/"));
|
|
5916
5947
|
}
|
|
5917
5948
|
}
|
|
5918
5949
|
}
|
|
@@ -6072,7 +6103,7 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITI
|
|
|
6072
6103
|
let totalLines = "...";
|
|
6073
6104
|
let actualEndLine = eLine;
|
|
6074
6105
|
try {
|
|
6075
|
-
const absPath =
|
|
6106
|
+
const absPath = path16.resolve(process.cwd(), targetPath2);
|
|
6076
6107
|
if (fs16.existsSync(absPath)) {
|
|
6077
6108
|
const content = fs16.readFileSync(absPath, "utf8");
|
|
6078
6109
|
const lines = content.split("\n").length;
|
|
@@ -6094,8 +6125,8 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITI
|
|
|
6094
6125
|
}
|
|
6095
6126
|
} else if (normToolName === "list_files" || normToolName === "read_folder") {
|
|
6096
6127
|
const action = normToolName === "list_files" ? "List" : "Viewed";
|
|
6097
|
-
const
|
|
6098
|
-
label = `\u{1F4C2} ${action}: ${
|
|
6128
|
+
const path18 = parseArgs(toolCall.args).path;
|
|
6129
|
+
label = `\u{1F4C2} ${action}: ${path18 === "." ? "./" : path18}`;
|
|
6099
6130
|
} else if (normToolName === "write_file" || normToolName === "update_file") {
|
|
6100
6131
|
const action = normToolName === "write_file" ? "Created" : "Edited";
|
|
6101
6132
|
label = `\u{1F4BE} ${action}: ${parseArgs(toolCall.args).path || "..."}`;
|
|
@@ -6117,7 +6148,7 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITI
|
|
|
6117
6148
|
const { command } = parseArgs(toolCall.args);
|
|
6118
6149
|
if (command && settings.systemSettings && settings.systemSettings.allowExternalAccess === false) {
|
|
6119
6150
|
const riskyPatterns = [/[a-zA-Z]:[\\\/]/i, /^\//, /\.\.[\\\/]/, /\/etc\//, /\/var\//, /\/root\//, /\/bin\//, /\/usr\//];
|
|
6120
|
-
const currentDrive =
|
|
6151
|
+
const currentDrive = path16.resolve(process.cwd()).substring(0, 3).toLowerCase();
|
|
6121
6152
|
const isViolating = riskyPatterns.some((pattern) => {
|
|
6122
6153
|
if (pattern.source === "[a-zA-Z]:[\\\\\\/]") {
|
|
6123
6154
|
const driveMatch = command.match(/[a-zA-Z]:[\\\/]/i);
|
|
@@ -6146,8 +6177,8 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITI
|
|
|
6146
6177
|
const targetPath = parsedArgs.path || parsedArgs.targetPath || null;
|
|
6147
6178
|
if (targetPath) {
|
|
6148
6179
|
const isExternalOff = settings.systemSettings && settings.systemSettings.allowExternalAccess === false;
|
|
6149
|
-
const absoluteTarget =
|
|
6150
|
-
const absoluteCwd =
|
|
6180
|
+
const absoluteTarget = path16.resolve(targetPath);
|
|
6181
|
+
const absoluteCwd = path16.resolve(process.cwd());
|
|
6151
6182
|
if (isExternalOff && !absoluteTarget.startsWith(absoluteCwd)) {
|
|
6152
6183
|
const denyMsg = `Access Denied. You are not allowed to access files outside the current workspace.`;
|
|
6153
6184
|
if (normToolName === "write_file" || normToolName === "update_file") {
|
|
@@ -6418,9 +6449,9 @@ ${boxBottom}` };
|
|
|
6418
6449
|
const errMsg = err.status || err.error && err.error.message || String(err);
|
|
6419
6450
|
const errLog = String(err);
|
|
6420
6451
|
const date = (/* @__PURE__ */ new Date()).toLocaleString();
|
|
6421
|
-
const agentErrDir =
|
|
6452
|
+
const agentErrDir = path16.join(LOGS_DIR, "agent");
|
|
6422
6453
|
if (!fs16.existsSync(agentErrDir)) fs16.mkdirSync(agentErrDir, { recursive: true });
|
|
6423
|
-
fs16.appendFileSync(
|
|
6454
|
+
fs16.appendFileSync(path16.join(agentErrDir, "error.log"), `ERROR [${date}]: ${errLog}
|
|
6424
6455
|
|
|
6425
6456
|
----------------------------------------------------------------------
|
|
6426
6457
|
|
|
@@ -6464,7 +6495,7 @@ ${recoveryText}`
|
|
|
6464
6495
|
yield { type: "status", content: `Error Occured. Recovering Stream...` };
|
|
6465
6496
|
} else {
|
|
6466
6497
|
throw new Error(`Stream collapsed too many times. (Failed to resolve ${MAX_RETRIES} times)
|
|
6467
|
-
Error Log can be found in ${
|
|
6498
|
+
Error Log can be found in ${path16.join(LOGS_DIR, "agent", "error.log")}`);
|
|
6468
6499
|
}
|
|
6469
6500
|
} else {
|
|
6470
6501
|
if (retryCount <= MAX_RETRIES) {
|
|
@@ -6481,7 +6512,7 @@ Error Log can be found in ${path15.join(LOGS_DIR, "agent", "error.log")}`);
|
|
|
6481
6512
|
yield { type: "status", content: `Trying to reach ${modelName}...` };
|
|
6482
6513
|
} else {
|
|
6483
6514
|
throw new Error(`Model ${modelName} cannot be reached. (Failed ${MAX_RETRIES} times)
|
|
6484
|
-
Error Log can be found in ${
|
|
6515
|
+
Error Log can be found in ${path16.join(LOGS_DIR, "agent", "error.log")}`);
|
|
6485
6516
|
}
|
|
6486
6517
|
}
|
|
6487
6518
|
}
|
|
@@ -7007,7 +7038,7 @@ import os4 from "os";
|
|
|
7007
7038
|
import React13, { useState as useState10, useEffect as useEffect7, useRef as useRef3, useMemo as useMemo2 } from "react";
|
|
7008
7039
|
import { Box as Box13, Text as Text13, useInput as useInput7, useStdout } from "ink";
|
|
7009
7040
|
import fs18 from "fs-extra";
|
|
7010
|
-
import
|
|
7041
|
+
import path17 from "path";
|
|
7011
7042
|
import { exec as exec3 } from "child_process";
|
|
7012
7043
|
import { fileURLToPath } from "url";
|
|
7013
7044
|
import TextInput4 from "ink-text-input";
|
|
@@ -8096,7 +8127,7 @@ ${hintText}`, color: "magenta" }];
|
|
|
8096
8127
|
}
|
|
8097
8128
|
case "/export": {
|
|
8098
8129
|
const exportFile = `export-fluxflow-${chatId}.txt`;
|
|
8099
|
-
const exportPath =
|
|
8130
|
+
const exportPath = path17.join(process.cwd(), exportFile);
|
|
8100
8131
|
const exportLines = [];
|
|
8101
8132
|
let insideAgentBlock = false;
|
|
8102
8133
|
for (let i = 0; i < messages.length; i++) {
|
|
@@ -8257,7 +8288,7 @@ ${list || "No saved chats found."}`, isMeta: true }];
|
|
|
8257
8288
|
# SKILLS & WORKFLOWS
|
|
8258
8289
|
- [Define custom step-by-step recipes for this project here]
|
|
8259
8290
|
`;
|
|
8260
|
-
const filePath =
|
|
8291
|
+
const filePath = path17.join(process.cwd(), "FluxFlow.md");
|
|
8261
8292
|
if (fs18.pathExistsSync(filePath)) {
|
|
8262
8293
|
setMessages((prev) => {
|
|
8263
8294
|
setCompletedIndex(prev.length + 1);
|
|
@@ -9409,7 +9440,7 @@ var init_app = __esm({
|
|
|
9409
9440
|
CHANGELOG_URL = "https://fluxflow-cli.onrender.com/changelog.html";
|
|
9410
9441
|
linesAdded = 0;
|
|
9411
9442
|
linesRemoved = 0;
|
|
9412
|
-
packageJsonPath =
|
|
9443
|
+
packageJsonPath = path17.join(path17.dirname(fileURLToPath(import.meta.url)), "../package.json");
|
|
9413
9444
|
packageJson = JSON.parse(fs18.readFileSync(packageJsonPath, "utf8"));
|
|
9414
9445
|
versionFluxflow = packageJson.version;
|
|
9415
9446
|
updatedOn = packageJson.date || "2026-05-20";
|
|
@@ -9530,14 +9561,14 @@ var init_app = __esm({
|
|
|
9530
9561
|
if (["node_modules", ".git", ".gemini", "dist", "build", ".next", ".cache", "out"].includes(file)) {
|
|
9531
9562
|
continue;
|
|
9532
9563
|
}
|
|
9533
|
-
const filePath =
|
|
9564
|
+
const filePath = path17.join(currentDir, file);
|
|
9534
9565
|
const stat = fs18.statSync(filePath);
|
|
9535
9566
|
if (stat.isDirectory()) {
|
|
9536
9567
|
scan(filePath);
|
|
9537
9568
|
} else {
|
|
9538
9569
|
fileList.push({
|
|
9539
9570
|
name: file,
|
|
9540
|
-
relativePath:
|
|
9571
|
+
relativePath: path17.relative(process.cwd(), filePath)
|
|
9541
9572
|
});
|
|
9542
9573
|
}
|
|
9543
9574
|
}
|