fluxflow-cli 3.4.11 → 3.5.0
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 -54
- package/package.json +2 -2
package/dist/fluxflow.js
CHANGED
|
@@ -5112,7 +5112,7 @@ var init_StatusBar = __esm({
|
|
|
5112
5112
|
paddingX: 1,
|
|
5113
5113
|
width: "100%"
|
|
5114
5114
|
},
|
|
5115
|
-
/* @__PURE__ */ React5.createElement(Box4, null, /* @__PURE__ */ React5.createElement(Box4, { marginRight: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: "white", bold: true }, mode.toUpperCase())), /* @__PURE__ */ React5.createElement(Text5, { color: "gray", dimColor: true }, "\u2503"), /* @__PURE__ */ React5.createElement(Box4, { marginX: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: "white", bold: true }, thinkingLevel.toUpperCase())), isMemoryEnabled && /* @__PURE__ */ React5.createElement(Box4, null, /* @__PURE__ */ React5.createElement(Text5, { color: "gray", dimColor: true }, "\u2503"), /* @__PURE__ */ React5.createElement(Box4, { marginX: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: "
|
|
5115
|
+
/* @__PURE__ */ React5.createElement(Box4, null, /* @__PURE__ */ React5.createElement(Box4, { marginRight: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: "white", bold: true }, mode.toUpperCase())), /* @__PURE__ */ React5.createElement(Text5, { color: "gray", dimColor: true }, "\u2503"), /* @__PURE__ */ React5.createElement(Box4, { marginX: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: "white", bold: true }, thinkingLevel.toUpperCase())), isMemoryEnabled && /* @__PURE__ */ React5.createElement(Box4, null, /* @__PURE__ */ React5.createElement(Text5, { color: "gray", dimColor: true }, "\u2503"), /* @__PURE__ */ React5.createElement(Box4, { marginX: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: "white", dimColor: true, bold: true }, "MEMORY")))),
|
|
5116
5116
|
/* @__PURE__ */ React5.createElement(Box4, { flexGrow: 1, justifyContent: "center", paddingX: 2 }, /* @__PURE__ */ React5.createElement(Text5, { color: "white", italic: true }, truncatePath(process.cwd(), 35))),
|
|
5117
5117
|
/* @__PURE__ */ React5.createElement(Box4, null, isProcessing ? /* @__PURE__ */ React5.createElement(Box4, { marginRight: 0 }, /* @__PURE__ */ React5.createElement(Text5, { color: dotColor }, "\u25CF")) : /* @__PURE__ */ React5.createElement(Text5, null, " "), /* @__PURE__ */ React5.createElement(Box4, { marginX: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: "white" }, formatTokens(tokensTotal), " ", (() => {
|
|
5118
5118
|
const pct = tokens / maxLimit * 100;
|
|
@@ -5356,7 +5356,7 @@ ${mode === "Flux" ? `- WORKSPACE TOOLS (path = relative to CWD & WILL BE FIRST A
|
|
|
5356
5356
|
5. [tool:functions.WriteFile(path="...", content="...")]. Creates/Overwrites. File Exist? PatchFile > WriteFile. Verify Imports
|
|
5357
5357
|
6. [tool:functions.SearchKeyword(keyword="...", file="optional", subString="true/false optional", regex="optional, false for keyword")]. 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. defaults subString: false, regex: auto-detect
|
|
5358
5358
|
7. [tool:functions.Run(command="...")]. Runs ${osDetected === "Windows" ? isPsAvailable() ? `WINDOWS POWERSHELL ONLY` : `WINDOWS CMD ONLY` : `BASH`} command. Destructive/Irreversible ops \u2192 Ask user
|
|
5359
|
-
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**
|
|
5359
|
+
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 OR markDone with 'create' to create completed tasks. **EVERY TURN UPDATE POLICY**
|
|
5360
5360
|
9. [tool:functions.Await(time="seconds")]. For waiting without exiting agent loop, 15s - 180s
|
|
5361
5361
|
${advanceRollback ? `
|
|
5362
5362
|
- EMERGENCY SAFETY TOOLS -
|
|
@@ -7097,17 +7097,46 @@ var init_history = __esm({
|
|
|
7097
7097
|
}
|
|
7098
7098
|
} catch (e) {
|
|
7099
7099
|
}
|
|
7100
|
-
const
|
|
7100
|
+
const extractPrompt = (msg) => {
|
|
7101
|
+
if (!msg || !msg.text) return void 0;
|
|
7102
|
+
const text = msg.text.replace(/\s*\n+\s*\[Prompted on:.*?\]/g, "").trim();
|
|
7103
|
+
const words = text.split(/\s+/);
|
|
7104
|
+
let prompt2 = void 0;
|
|
7105
|
+
if (words.length > 7) {
|
|
7106
|
+
prompt2 = words.slice(0, 7).join(" ") + "...";
|
|
7107
|
+
} else if (text.length > 45) {
|
|
7108
|
+
prompt2 = text.substring(0, 45).trimEnd() + "...";
|
|
7109
|
+
} else {
|
|
7110
|
+
prompt2 = text;
|
|
7111
|
+
}
|
|
7112
|
+
return prompt2;
|
|
7113
|
+
};
|
|
7114
|
+
let prompt = void 0;
|
|
7115
|
+
const userMessages = persistentMessages.filter((m) => m.role === "user");
|
|
7116
|
+
const firstUserMsg = userMessages[0];
|
|
7117
|
+
const latestUserMsg = userMessages[userMessages.length - 1];
|
|
7118
|
+
if (existingChat && existingChat.prompt) {
|
|
7119
|
+
if (Math.random() < 0.5) {
|
|
7120
|
+
prompt = extractPrompt(latestUserMsg) || existingChat.prompt;
|
|
7121
|
+
} else {
|
|
7122
|
+
prompt = existingChat.prompt;
|
|
7123
|
+
}
|
|
7124
|
+
} else {
|
|
7125
|
+
prompt = extractPrompt(firstUserMsg);
|
|
7126
|
+
}
|
|
7127
|
+
const finalName = name || (existingChat ? existingChat.name : prompt || `Session ${id.slice(-6)}`);
|
|
7101
7128
|
const chatFile = path7.join(HISTORY_DIR, `${id}.json`);
|
|
7102
7129
|
writeEncryptedJson(chatFile, persistentMessages);
|
|
7103
7130
|
history[id] = {
|
|
7104
7131
|
name: finalName,
|
|
7132
|
+
prompt: prompt || void 0,
|
|
7105
7133
|
updatedAt: Date.now()
|
|
7106
7134
|
};
|
|
7107
7135
|
const indexHistory = {};
|
|
7108
7136
|
for (const chatId in history) {
|
|
7109
7137
|
indexHistory[chatId] = {
|
|
7110
7138
|
name: history[chatId].name,
|
|
7139
|
+
prompt: history[chatId].prompt || void 0,
|
|
7111
7140
|
updatedAt: history[chatId].updatedAt
|
|
7112
7141
|
};
|
|
7113
7142
|
}
|
|
@@ -7127,6 +7156,7 @@ var init_history = __esm({
|
|
|
7127
7156
|
for (const chatId in history) {
|
|
7128
7157
|
indexHistory[chatId] = {
|
|
7129
7158
|
name: history[chatId].name,
|
|
7159
|
+
prompt: history[chatId].prompt || void 0,
|
|
7130
7160
|
updatedAt: history[chatId].updatedAt
|
|
7131
7161
|
};
|
|
7132
7162
|
}
|
|
@@ -7141,6 +7171,7 @@ var init_history = __esm({
|
|
|
7141
7171
|
for (const chatId in history) {
|
|
7142
7172
|
indexHistory[chatId] = {
|
|
7143
7173
|
name: history[chatId].name,
|
|
7174
|
+
prompt: history[chatId].prompt || void 0,
|
|
7144
7175
|
updatedAt: history[chatId].updatedAt
|
|
7145
7176
|
};
|
|
7146
7177
|
}
|
|
@@ -13100,17 +13131,19 @@ ${ideCtx.warnings}
|
|
|
13100
13131
|
}
|
|
13101
13132
|
}
|
|
13102
13133
|
const cleanAgentText = agentText.replace(/\s*\[Prompted on:.*?\]/g, "").trim();
|
|
13103
|
-
const tagRegex =
|
|
13134
|
+
const tagRegex = /(?:\\)?@\[([^\]]+)\]/g;
|
|
13104
13135
|
let match;
|
|
13105
13136
|
const tagsFound = [];
|
|
13106
13137
|
tagRegex.lastIndex = 0;
|
|
13107
13138
|
while ((match = tagRegex.exec(cleanAgentText)) !== null) {
|
|
13108
|
-
|
|
13139
|
+
const isEscaped = match[0].startsWith("\\");
|
|
13140
|
+
tagsFound.push({ tag: match[1], isEscaped });
|
|
13109
13141
|
}
|
|
13110
13142
|
let taggedContextBlocks = [];
|
|
13111
13143
|
let attachedBinaryPart = null;
|
|
13112
13144
|
for (let tIdx = 0; tIdx < tagsFound.length; tIdx++) {
|
|
13113
|
-
const tag = tagsFound[tIdx];
|
|
13145
|
+
const { tag, isEscaped } = tagsFound[tIdx];
|
|
13146
|
+
if (isEscaped) continue;
|
|
13114
13147
|
try {
|
|
13115
13148
|
let tagClean = tag.trim().replace(/^["']|["']$/g, "");
|
|
13116
13149
|
const lineRangeRegex = /[:#]L?(\d+)(?:-L?(\d+))?$/i;
|
|
@@ -13132,7 +13165,7 @@ ${ideCtx.warnings}
|
|
|
13132
13165
|
const isOfficeFile = pathLower.endsWith(".docx") || pathLower.endsWith(".doc") || pathLower.endsWith(".ppt") || pathLower.endsWith(".pptx") || pathLower.endsWith(".xls") || pathLower.endsWith(".xlsx");
|
|
13133
13166
|
const isImage = /\.(png|jpg|jpeg|webp|gif|bmp)$/.test(pathLower);
|
|
13134
13167
|
const isMultimodalFile = isImage || isPdf || isOfficeFile;
|
|
13135
|
-
const isSupported = aiProvider === "Google" ||
|
|
13168
|
+
const isSupported = aiProvider === "Google" || isModelMultimodal(modelName);
|
|
13136
13169
|
if (isMultimodalFile && !isSupported) {
|
|
13137
13170
|
const label = `\u2718 Unsupported Modality: ${path22.basename(filePath)}`;
|
|
13138
13171
|
let terminalWidth = 115;
|
|
@@ -13211,15 +13244,16 @@ ${ideCtx.warnings}
|
|
|
13211
13244
|
}
|
|
13212
13245
|
let taggedContextStr = "";
|
|
13213
13246
|
if (taggedContextBlocks.length > 0) {
|
|
13214
|
-
taggedContextStr = "[TAGGED FILE CONTENTS] Auto Read, System Provided Context\n" + taggedContextBlocks.join("\n\n") + "\n[/TAGGED FILE CONTENTS]\n";
|
|
13247
|
+
taggedContextStr = "[TAGGED FILE CONTENTS] Auto Read, System Provided Context for User Tagged Files\n" + taggedContextBlocks.join("\n\n") + "\n[/TAGGED FILE CONTENTS]\n";
|
|
13215
13248
|
}
|
|
13216
13249
|
const osDetected = process.platform === "win32" ? "Windows" : process.platform === "darwin" ? "macOS" : "Linux";
|
|
13250
|
+
const cleanPromptForModel = cleanAgentText.replace(/\\(@\[[^\]]+\])/g, "$1");
|
|
13217
13251
|
const firstUserMsg = `[SYSTEM METADATA (PRIORITY: DYNAMIC), Chat Context >> Metadata] Time: ${dateTimeStr}
|
|
13218
13252
|
OS: ${osDetected}
|
|
13219
13253
|
CWD: ${process.cwd()}${isPlayground ? " [PLAYGROUND MODE]" : ""}${cwdMismatch ? ` (WARNING: CWD Mismatch! Previous Path: ${lastCwd})` : ""}
|
|
13220
13254
|
**DIRECTORY STRUCTURE**
|
|
13221
13255
|
${dirStructure}${memoryPrompt}${ideBlock}
|
|
13222
|
-
${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" && aiProvider === "Google" ? `${modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS HIGH PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think>** [/SYSTEM]\n" : ""}` : "\n"}${taggedContextStr}[USER PROMPT] ${
|
|
13256
|
+
${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" && aiProvider === "Google" ? `${modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS HIGH PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think>** [/SYSTEM]\n" : ""}` : "\n"}${taggedContextStr}[USER PROMPT] ${cleanPromptForModel.trim()} [/USER PROMPT]`.trim();
|
|
13223
13257
|
const userMsgObj = { role: "user", text: firstUserMsg };
|
|
13224
13258
|
if (attachedBinaryPart) {
|
|
13225
13259
|
userMsgObj.binaryPart = attachedBinaryPart;
|
|
@@ -14087,7 +14121,8 @@ ${ideErr} [/ERROR]`;
|
|
|
14087
14121
|
label = `\u2714 Generated: ${parseArgs(toolCall.args).path || "..."}
|
|
14088
14122
|
`;
|
|
14089
14123
|
} else if (normToolName === "file_map") {
|
|
14090
|
-
|
|
14124
|
+
const path24 = parseArgs(toolCall.args).path;
|
|
14125
|
+
label = `${path24 ? "\u2714" : "\u2718"} Indexed${path24 ? ": " + path24 : " File Not Found"}`;
|
|
14091
14126
|
} else if (normToolName.toLowerCase() === "search_keyword" || normToolName.toLowerCase() === "todo") {
|
|
14092
14127
|
label = "";
|
|
14093
14128
|
} else if (normToolName.toLowerCase() === "generate_image") {
|
|
@@ -15546,7 +15581,11 @@ function ResumeModal({ onSelect, onDelete, onClose }) {
|
|
|
15546
15581
|
backgroundColor: isSelected ? "#2a2a2a" : void 0,
|
|
15547
15582
|
width: "100%"
|
|
15548
15583
|
},
|
|
15549
|
-
/* @__PURE__ */ React10.createElement(Box9, { flexGrow: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: isSelected ? "while" : "grey", bold: isSelected }, isSelected ? "\u276F " : " ",
|
|
15584
|
+
/* @__PURE__ */ React10.createElement(Box9, { flexGrow: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: isSelected ? "while" : "grey", bold: isSelected }, isSelected ? "\u276F " : " ", (() => {
|
|
15585
|
+
if (chat2?.name && !chat2.name.startsWith("Session")) return chat2.name;
|
|
15586
|
+
if (chat2?.prompt) return chat2.prompt;
|
|
15587
|
+
return chat2?.name || id;
|
|
15588
|
+
})(), /* @__PURE__ */ React10.createElement(Text10, { color: `${!isSelected ? "grey" : "grey"}` }, " [", dateStr, " \u2022 ", id, "]"))),
|
|
15550
15589
|
isSelected && /* @__PURE__ */ React10.createElement(Box9, { flexShrink: 0 }, /* @__PURE__ */ React10.createElement(Text10, { color: "white", bold: true }, "[X] DELETE "))
|
|
15551
15590
|
);
|
|
15552
15591
|
}), startIndex + MAX_VISIBLE < keys.length && /* @__PURE__ */ React10.createElement(Box9, { paddingX: 2, marginTop: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: "gray" }, "\u25BC (+", keys.length - (startIndex + MAX_VISIBLE), " more chats below)"))), /* @__PURE__ */ React10.createElement(
|
|
@@ -15760,7 +15799,7 @@ var init_UpdateProcessor = __esm({
|
|
|
15760
15799
|
lines[lines.length - 1] = cleanStr;
|
|
15761
15800
|
return lines.slice(-5).join("\n");
|
|
15762
15801
|
}
|
|
15763
|
-
return (prev + "\n" + cleanStr).split("\n").slice(-
|
|
15802
|
+
return (prev + "\n" + cleanStr).split("\n").slice(-10).join("\n");
|
|
15764
15803
|
});
|
|
15765
15804
|
}
|
|
15766
15805
|
};
|
|
@@ -18317,7 +18356,22 @@ ${cleanText}`, color: "magenta" }];
|
|
|
18317
18356
|
break;
|
|
18318
18357
|
}
|
|
18319
18358
|
case "/save": {
|
|
18320
|
-
|
|
18359
|
+
let promptDefault = void 0;
|
|
18360
|
+
const firstUserMsg = messages.find((m) => m.role === "user");
|
|
18361
|
+
if (firstUserMsg && firstUserMsg.text) {
|
|
18362
|
+
const text = firstUserMsg.text.replace(/\s*\n+\s*\[Prompted on:.*?\]/g, "").trim();
|
|
18363
|
+
const words = text.split(/\s+/);
|
|
18364
|
+
let truncatedPrompt = void 0;
|
|
18365
|
+
if (words.length > 7) {
|
|
18366
|
+
truncatedPrompt = words.slice(0, 7).join(" ") + "...";
|
|
18367
|
+
} else if (text.length > 45) {
|
|
18368
|
+
truncatedPrompt = text.substring(0, 45).trimEnd() + "...";
|
|
18369
|
+
} else {
|
|
18370
|
+
truncatedPrompt = text;
|
|
18371
|
+
}
|
|
18372
|
+
promptDefault = truncatedPrompt;
|
|
18373
|
+
}
|
|
18374
|
+
const name = parts.slice(1).join(" ") || promptDefault || `Session ${(/* @__PURE__ */ new Date()).toLocaleTimeString()}`;
|
|
18321
18375
|
saveChat(chatId, name, messages);
|
|
18322
18376
|
setMessages((prev) => {
|
|
18323
18377
|
setCompletedIndex(prev.length + 1);
|
|
@@ -18766,46 +18820,19 @@ ${timestamp}` };
|
|
|
18766
18820
|
turnMessages.push(preprocessed[i]);
|
|
18767
18821
|
i++;
|
|
18768
18822
|
}
|
|
18769
|
-
const toolCalls = [];
|
|
18770
|
-
const toolResults = [];
|
|
18771
|
-
const finalResponses = [];
|
|
18772
18823
|
turnMessages.forEach((tm) => {
|
|
18773
|
-
const textLower = (tm.text || "").toLowerCase();
|
|
18774
|
-
const hasTool = textLower.includes("tool:functions.") || textLower.includes("agent:generalist.");
|
|
18775
18824
|
const isResult = tm.role === "system" && (tm.text?.startsWith("[TOOL RESULT]") || tm.text?.startsWith("SUCCESS:") || tm.text?.startsWith("ERROR:") || tm.text?.startsWith("[TERMINAL_RECORD]") || tm.isTerminalRecord);
|
|
18776
|
-
|
|
18777
|
-
|
|
18778
|
-
|
|
18779
|
-
|
|
18780
|
-
|
|
18781
|
-
|
|
18782
|
-
|
|
18783
|
-
toolResults.push(tm.text);
|
|
18825
|
+
const emitRole = isResult ? "system" : "agent";
|
|
18826
|
+
const rawText = (tm.text || "").trim();
|
|
18827
|
+
if (!rawText) return;
|
|
18828
|
+
const emitText = isResult && !rawText.startsWith("[TOOL RESULT]") ? `[TOOL RESULT]: ${rawText}` : rawText;
|
|
18829
|
+
const last = cleanHistoryForAI[cleanHistoryForAI.length - 1];
|
|
18830
|
+
if (last && last.role === emitRole) {
|
|
18831
|
+
last.text = last.text + "\n\n" + emitText;
|
|
18784
18832
|
} else {
|
|
18785
|
-
|
|
18833
|
+
cleanHistoryForAI.push({ role: emitRole, text: emitText });
|
|
18786
18834
|
}
|
|
18787
18835
|
});
|
|
18788
|
-
if (toolCalls.length > 0) {
|
|
18789
|
-
cleanHistoryForAI.push({
|
|
18790
|
-
role: "agent",
|
|
18791
|
-
text: toolCalls.map((tc) => tc.trim()).filter(Boolean).join("\n")
|
|
18792
|
-
});
|
|
18793
|
-
}
|
|
18794
|
-
if (toolResults.length > 0) {
|
|
18795
|
-
cleanHistoryForAI.push({
|
|
18796
|
-
role: "system",
|
|
18797
|
-
text: toolResults.map((tr) => {
|
|
18798
|
-
const trimmed = tr.trim();
|
|
18799
|
-
return trimmed.startsWith("[TOOL RESULT]") ? trimmed : `[TOOL RESULT]: ${trimmed}`;
|
|
18800
|
-
}).filter(Boolean).join("\n\n")
|
|
18801
|
-
});
|
|
18802
|
-
}
|
|
18803
|
-
if (finalResponses.length > 0) {
|
|
18804
|
-
cleanHistoryForAI.push({
|
|
18805
|
-
role: "agent",
|
|
18806
|
-
text: finalResponses.map((fr) => fr.trim()).filter(Boolean).join("\n\n")
|
|
18807
|
-
});
|
|
18808
|
-
}
|
|
18809
18836
|
}
|
|
18810
18837
|
}
|
|
18811
18838
|
const stream = getAIStream(
|
|
@@ -19438,10 +19465,13 @@ Selection: ${val}`,
|
|
|
19438
19465
|
}
|
|
19439
19466
|
const parts = input.split(" ");
|
|
19440
19467
|
const lastPart = parts[parts.length - 1];
|
|
19441
|
-
|
|
19468
|
+
const isEscapedAt = lastPart && lastPart.startsWith("\\@");
|
|
19469
|
+
const isPlainAt = lastPart && lastPart.startsWith("@");
|
|
19470
|
+
if ((isPlainAt || isEscapedAt) && !isFilePickerDismissed) {
|
|
19442
19471
|
const hashIndex = lastPart.indexOf("#");
|
|
19443
19472
|
const hasHash = hashIndex !== -1;
|
|
19444
|
-
const
|
|
19473
|
+
const prefixLen = isEscapedAt ? 2 : 1;
|
|
19474
|
+
const query = hasHash ? lastPart.substring(prefixLen, hashIndex).toLowerCase() : lastPart.slice(prefixLen).toLowerCase();
|
|
19445
19475
|
const suffix = hasHash ? lastPart.substring(hashIndex) : "";
|
|
19446
19476
|
const projectFiles = getProjectFiles(process.cwd());
|
|
19447
19477
|
const matches = projectFiles.filter((f) => f.name.toLowerCase().includes(query));
|
|
@@ -19449,7 +19479,7 @@ Selection: ${val}`,
|
|
|
19449
19479
|
const relPath = f.relativePath.replace(/\\/g, "/");
|
|
19450
19480
|
const formattedPath = relPath.startsWith(".") ? relPath : "./" + relPath;
|
|
19451
19481
|
return {
|
|
19452
|
-
cmd: "@[" + formattedPath + suffix + "]",
|
|
19482
|
+
cmd: (isEscapedAt ? "\\@" : "@") + "[" + formattedPath + suffix + "]",
|
|
19453
19483
|
desc: f.relativePath
|
|
19454
19484
|
};
|
|
19455
19485
|
});
|
|
@@ -20562,7 +20592,7 @@ Selection: ${val}`,
|
|
|
20562
20592
|
width: "100%",
|
|
20563
20593
|
marginBottom: 1
|
|
20564
20594
|
},
|
|
20565
|
-
/* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginBottom: 0, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true }, suggestions[0]?.cmd?.startsWith("@") ? "FILE SUGGESTIONS" : "COMMAND SUGGESTIONS"), suggestions[0]?.cmd?.startsWith("@") ? /* @__PURE__ */ React16.createElement(Text16, { color: "gray", italic: true }, "(Use \\'#Lstart-Lend\\' to specify line numbers)") : input.startsWith("/model") && apiTier === "Free" ? (() => {
|
|
20595
|
+
/* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginBottom: 0, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true }, suggestions[0]?.cmd?.startsWith("@") || suggestions[0]?.cmd?.startsWith("\\@") ? "FILE SUGGESTIONS" : "COMMAND SUGGESTIONS"), suggestions[0]?.cmd?.startsWith("@") || suggestions[0]?.cmd?.startsWith("\\@") ? /* @__PURE__ */ React16.createElement(Text16, { color: "gray", italic: true }, "(Use \\'#Lstart-Lend\\' to specify line numbers)") : input.startsWith("/model") && apiTier === "Free" ? (() => {
|
|
20566
20596
|
let url = "https://aistudio.google.com/billing";
|
|
20567
20597
|
let label = "billing";
|
|
20568
20598
|
if (aiProvider === "DeepSeek") {
|
|
@@ -20597,8 +20627,8 @@ Selection: ${val}`,
|
|
|
20597
20627
|
color: isDivider ? "#D0CCD8" : isGemmaDisabled ? "gray" : isActive ? "white" : "grey",
|
|
20598
20628
|
bold: false
|
|
20599
20629
|
},
|
|
20600
|
-
s.cmd
|
|
20601
|
-
const pathPart = s.cmd.slice(2, -1);
|
|
20630
|
+
s.cmd && (s.cmd.startsWith("@[") || s.cmd.startsWith("\\@[")) && s.cmd.endsWith("]") ? (() => {
|
|
20631
|
+
const pathPart = s.cmd.startsWith("\\@[") ? s.cmd.slice(3, -1) : s.cmd.slice(2, -1);
|
|
20602
20632
|
const parts = pathPart.split(/[/\\]/);
|
|
20603
20633
|
return parts[parts.length - 1];
|
|
20604
20634
|
})() : s.cmd && s.cmd.includes("/") ? s.cmd.split("/").pop() : s.cmd
|