fluxflow-cli 1.9.8 → 1.9.9
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 +131 -185
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -209,7 +209,7 @@ var init_ChatLayout = __esm({
|
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
return result.replace(/^\[TOOL_RESULT\]:\s*/gi, "").split("\n").filter((line) => !line.trim().startsWith("SUCCESS:") && !line.trim().startsWith("ERROR:")).join("\n").replace(/\[\s*turn\s*:\s*(continue|finish)\s*\]/gi, "").replace(/\[\s*turn\s*:?.*?$/gi, "").replace(/\n\s*turn\s*:?.*?$/gi, "").replace(/\[\s*$/gi, "").replace(/\n\nResponded on .*/g, "").replace(/\n\n\[Prompted on: .*\]/g, "").replace(/(\$?\\?\/?\\rightarrow\$?|\$\\rightarrow\$)/gi, "\u2192").replace(/(\$?\\?\/?\\leftarrow\$?|\$\\leftarrow\$)/gi, "\u2190").replace(/(\$?\\?\/?\\uparrow\$?|\$\\uparrow\$)/gi, "\u2191").replace(/(\$?\\?\/?\\downarrow\$?|\$\\downarrow\$)/gi, "\u2193").replace(/(\$?\\?\/?\\leftrightarrow\$?|\$\\leftrightarrow\$)/gi, "\u2194").replace(
|
|
212
|
+
return result.replace(/^\[TOOL_RESULT\]:\s*/gi, "").split("\n").filter((line) => !line.trim().startsWith("SUCCESS:") && !line.trim().startsWith("ERROR:")).join("\n").replace(/\[\s*turn\s*:\s*(continue|finish)\s*\]/gi, "").replace(/\[\s*turn\s*:?.*?$/gi, "").replace(/\n\s*turn\s*:?.*?$/gi, "").replace(/\[\s*$/gi, "").replace(/\n\nResponded on .*/g, "").replace(/\n\n\[Prompted on: .*\]/g, "").replace(/(\$?\\?\/?\\rightarrow\$?|\$\\rightarrow\$)/gi, "\u2192").replace(/(\$?\\?\/?\\leftarrow\$?|\$\\leftarrow\$)/gi, "\u2190").replace(/(\$?\\?\/?\\uparrow\$?|\$\\uparrow\$)/gi, "\u2191").replace(/(\$?\\?\/?\\downarrow\$?|\$\\downarrow\$)/gi, "\u2193").replace(/(\$?\\?\/?\\leftrightarrow\$?|\$\\leftrightarrow\$)/gi, "\u2194").replace(/@\[TerminalName:.*?, ProcessId:.*?\]/gi, "").replace(/\b(write_file|update_file|read_folder|view_file|exec_command|web_search|web_scrape|search_keyword|write_pdf|write_pptx|write_docx)\b/gi, (match) => TOOL_LABELS[match.toLowerCase()] || match).trim();
|
|
213
213
|
};
|
|
214
214
|
formatThinkText = (cleaned, columns = 80) => {
|
|
215
215
|
if (!cleaned) return null;
|
|
@@ -533,7 +533,7 @@ var init_ChatLayout = __esm({
|
|
|
533
533
|
finalContent.replace(/\r\n/g, "\n").replace(/\r/g, "\n").replace(/\\\n/g, "\n").replace(/\\$/, ""),
|
|
534
534
|
columns - 6
|
|
535
535
|
).split("\n").map((line, lineIdx) => /* @__PURE__ */ React2.createElement(Box2, { key: lineIdx, flexDirection: "row", width: "100%" }, /* @__PURE__ */ React2.createElement(Box2, { flexShrink: 0, width: 2 }, /* @__PURE__ */ React2.createElement(Text2, { bold: true, color: "white" }, lineIdx === 0 ? "\u276F" : " ")), /* @__PURE__ */ React2.createElement(Box2, { flexGrow: 1, marginLeft: 1 }, /* @__PURE__ */ React2.createElement(Text2, { color: msg.color || "white", wrap: "anywhere" }, line))))
|
|
536
|
-
) : msg.role === "think" ? /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", marginTop: 0, marginBottom: 0, paddingX: 1, width: "100%" }, /* @__PURE__ */ React2.createElement(Text2, { bold: true, color: "white" }, "Thinking..."), /* @__PURE__ */ React2.createElement(Box2, { borderStyle: "single", borderLeft: true, borderRight: false, borderTop: false, borderBottom: false, paddingLeft: 2, paddingTop: 1, paddingBottom: 1, flexDirection: "column", width: "100%" }, formatThinkText(finalContent, columns))) : /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", paddingX: 1, marginTop:
|
|
536
|
+
) : msg.role === "think" ? /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", marginTop: 0, marginBottom: 0, paddingX: 1, width: "100%" }, /* @__PURE__ */ React2.createElement(Text2, { bold: true, color: "white" }, "Thinking..."), /* @__PURE__ */ React2.createElement(Box2, { borderStyle: "single", borderLeft: true, borderRight: false, borderTop: false, borderBottom: false, paddingLeft: 2, paddingTop: 1, paddingBottom: 1, flexDirection: "column", width: "100%" }, formatThinkText(finalContent, columns))) : /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", paddingX: 1, marginTop: 0, width: "100%" }, /* @__PURE__ */ React2.createElement(CodeRenderer, { text: finalContent, columns }), msg.memoryUpdated && /* @__PURE__ */ React2.createElement(Box2, { marginTop: 1, width: "100%" }, /* @__PURE__ */ React2.createElement(Text2, { color: "yellow", italic: true }, "\u2728 [Memory Updated]"))));
|
|
537
537
|
});
|
|
538
538
|
ChatLayout = React2.memo(({ messages, showFullThinking, columns = 80 }) => {
|
|
539
539
|
return /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", width: "100%" }, messages.map((msg, idx) => /* @__PURE__ */ React2.createElement(
|
|
@@ -868,60 +868,45 @@ var TOOL_PROTOCOL;
|
|
|
868
868
|
var init_main_tools = __esm({
|
|
869
869
|
"src/data/main_tools.js"() {
|
|
870
870
|
TOOL_PROTOCOL = (mode) => `
|
|
871
|
-
-- START
|
|
872
|
-
|
|
873
|
-
|
|
871
|
+
-- START TOOL DEFINITIONS --
|
|
872
|
+
You have access to internal tools. To call a tool, you MUST use the following exact syntax on a new line:
|
|
873
|
+
[tool:functions.tool_name(arguments)]
|
|
874
874
|
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
875
|
+
- COMMUNICATION TOOLS -
|
|
876
|
+
1. Ask User: [tool:functions.ask(question="...", optionA="...", ...)]. Use for ambiguity. Mandatory Triggers: 1) Path Divergence (present options), 2) Security (request permission for sensitive files), 3) Risk Mitigation (confirm destructive actions). Prefer this over finishing for clarification.
|
|
877
|
+
NOTE: Suggest best options; don't ask for preferences. System handles the rest.
|
|
878
878
|
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
${mode === "Flux" ? `
|
|
883
|
-
- DEV & FILE TOOLS (Available in FLUX MODE ONLY) -
|
|
884
|
-
1. View File: [tool:functions.view_file(path="relative/path", start_line=number, end_line=number)]. Reads file content. Auto-truncates at 500 lines unless start_line and end_line are provided. YOU CAN ALSO USE THIS TOOL TO SEE IMAGES AND DOCUMENTS IN A FOLDER. IF USER ASK HOW TO SHARE A IMAGE TELL THEM TO PASTE THE IMAGE IN THE CURRENT FOLDER. IF USER GIVES A IMAGE/DOCUMENT, YOU MUST SEE IT FIRST BEFORE DOING ANYTHING.
|
|
885
|
-
2. Read Folder: [tool:functions.read_folder(path="relative/path")]. Detailed stats of a directory.
|
|
886
|
-
3. Write File: [tool:functions.write_file(path="path", content="content to write. FOLLOW THE NEW LINE POLICY TO USE THIS TOOL PROPERLY.")]. Creates/Overwrites. DO NOT USE CODE BLOCKS IN FILES. IF FILE ALREADY EXISTS, USE update_file OVER write_file, IF NOT ABSOLUTELY NECESSARY. **DO NOT FORGET TO FOLLOW THE NEW LINE PROTOCOL. FOR STRUCTURAL LINE BREAKS PRESS ENTER, TO WRITE \\n IN FILE USE [/n]**. **BUT NEVER USE [/n] FOR STRUCTURAL LINE BREAKS (pressing ENTER).** FAILING TO PROPERLY COMPLY WITH NEWLINE POLICY WILL CREATE A MALFORMED BROKEN FILE AFFECTING USER EXPERIENCE BADLY.
|
|
887
|
-
4. Update File: [tool:functions.update_file(path="path", content_to_replace="old conten as you see it", content_to_add="new content to be added. FOLLOW THE NEW LINE POLICY TO USE THIS TOOL PROPERLY.")]. Surgical patching. DO NOT USE CODE BLOCKS IN FILES. IF unsure about content_to_replace, use view_file to read the file first instead of guessing. **DO NOT FORGET TO FOLLOW THE NEW LINE PROTOCOL. FOR STRUCTURAL LINE BREAKS PRESS ENTER, TO WRITE \\n IN FILE USE [/n]**. **BUT NEVER USE [/n] FOR STRUCTURAL LINE BREAKS (pressing ENTER).** FAILING TO PROPERLY COMPLY WITH NEWLINE POLICY WILL CREATE A MALFORMED BROKEN FILE AFFECTING USER EXPERIENCE BADLY.
|
|
888
|
-
5. Write PDF: [tool:functions.write_pdf(path="path", content="<html/css content>", orientation="portrait || landscape")]. Generates a professional PDF document. Orientation is optional. A4 size page will be used, so any multi-page PDFs calculate your alightment and page breaks to not mess up A4 page layout. DO NOT ADD FOOTER MANUALLY, the system will handle it automatically. USE CSS TO VISUALLY BEAUTIFY THE DOCUMENT, USE full 100vh & 100vw for page area. ENSURE THE CONTENT IS NEVER BROKEN IN BETWEEN PAGES, USE PAGE BREAKS PROACTIVELY FOR A A4 PAGE LAYOUT. Keep generous margins for better redability.
|
|
889
|
-
6. Write DOCX: [tool:functions.write_docx(path="path", content="<html content>")]. Generates a professional Word document (.docx) from HTML. You can make multiple pages. Default Page dimentions will be A4, use proper margins and page break strategy.
|
|
890
|
-
7. Write PPTX: [tool:functions.write_pptx(path="path", content="<h1 style='color: #0088CC;'>Title</h1><ul style='font-size: 14pt;'><li>Point A</li></ul>
|
|
891
|
-
---
|
|
892
|
-
<p align='center'>Styled Slide</p>")]. Generates a professional PowerPoint presentation (.pptx) from a flat HTML string. Use '---' on a new line to separate slides. Aspect Ratio is 4:3.
|
|
893
|
-
- Supported Tags: <a>, <b>, <br>, <del>, <font>, <h1>-<h6>, <i>, <ol>, <ul>, <li>, <p>, <pre>, <s>, <sub>, <sup>, <u>.
|
|
894
|
-
- Supported Styles: background-color, color, font-family, font-size (use 'pt'), font-style (italic), font-weight (bold), margin, text-align, text-shadow.
|
|
895
|
-
8. Execution: [tool:functions.exec_command(command="terminal command")]. Runs a shell command. Use ask tool to confirm before executing any destructive or irreversible operations.
|
|
896
|
-
9. Search Keyword: [tool:functions.search_keyword(keyword="...")]. Global search for a string across the entire project. RETURNS: List of matches with relative file paths and line numbers. Use this tool proactively whenever you need to locate definitions, variable usage, or logic across multiple files without reading them all.
|
|
879
|
+
- WEB TOOLS -
|
|
880
|
+
1. Web Search: [tool:functions.web_search(query="...", limit=number)]. Find info (limit 3-10, default 10). Use proactively for unknown topics${mode === "Flux" ? " or documentation." : "."}
|
|
881
|
+
2. Web Scrape: [tool:functions.web_scrape(url="<url>")]. provides detail from a URL.
|
|
897
882
|
|
|
898
|
-
|
|
899
|
-
|
|
883
|
+
${mode === "Flux" ? `
|
|
884
|
+
- DEV & FILE TOOLS (path will always be relative to CWD) -
|
|
885
|
+
1. View File: [tool:functions.view_file(path="...", start_line=N, end_line=N)]. Reads content (800 lines max). Supports images/docs. If user provides an image/doc, view it first.
|
|
886
|
+
2. Read Folder: [tool:functions.read_folder(path="...")]. Detailed stats of a directory.
|
|
887
|
+
3. Write File: [tool:functions.write_file(path="...", content="content to write")]. Creates/Overwrites. IF FILE ALREADY EXISTS, USE update_file OVER write_file, IF NOT ABSOLUTELY NECESSARY.
|
|
888
|
+
4. Update File: [tool:functions.update_file(path="...", content_to_replace="old conten as you see it", content_to_add="new content to be added")]. Surgical patching. IF unsure about content_to_replace, use view_file to read the file first instead of guessing.
|
|
889
|
+
5. Write PDF: [tool:functions.write_pdf(path="...", content="html", orientation="...")]. A4 PDF. Use CSS for layout (100vh/vw). Handle page breaks pro-actively; no manual footers.
|
|
890
|
+
6. Write DOCX: [tool:functions.write_docx(path="...", content="html")]. A4 Word doc. Use proper margins and page breaks.
|
|
891
|
+
7. PPTX: [tool:functions.write_pptx(path="...", content="html")]. 4:3 PPTX. '---' for slides.
|
|
892
|
+
Tags: a,b,br,del,font,h1-h6,i,ol,ul,li,p,pre,s,sub,sup,u
|
|
893
|
+
CSS: background-color,color,font-family,font-size(pt),font-style,font-weight,margin,text-align,text-shadow
|
|
894
|
+
8. Execution: [tool:functions.exec_command(command="command")]. Runs a shell command. Use ask tool to confirm before executing any destructive or irreversible operations.
|
|
895
|
+
9. Search: [tool:functions.search_keyword(keyword="...")]. Global search. Use to locate definitions/logic without reading every file.
|
|
900
896
|
|
|
901
|
-
|
|
897
|
+
- VERIFY SUCCESS CONTENTS. Fix errors. No success hallucinations.
|
|
898
|
+
- No guessing; read files before editing.
|
|
899
|
+
- File tools > Chat code blocks.
|
|
902
900
|
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
4. NEVER USE [/n] FOR STRUCTURAL LINE BREAKS (pressing ENTER).
|
|
908
|
-
5. [/n] WILL ALWAYS WRITE \\n LITERALLY IN THE FILE. [/n] SHOULD ALWAYS BE USED **INSIDE** STRINGS ONLY.
|
|
909
|
-
***
|
|
901
|
+
- Escape quotes: Use \\" inside code strings.
|
|
902
|
+
- Literal escapes: Double-escape sequences (e.g., \\\\n, \\\\t).
|
|
903
|
+
- File structure: Use real newlines for code formatting.`.trim() : `
|
|
904
|
+
- DEV & FILE TOOLS ARE NOT AVAILABLE IN FLOW MODE. If you need to access files, tell the user to switch to FLUX MODE (manually by user).`.trim()}
|
|
910
905
|
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
tool:functions.write_file(path="app.js", content="const x = "hello";")`.trim() : `
|
|
916
|
-
- DEV & FILE TOOLS ARE NOT AVAILABLE IN FLOW MODE. If you need to access files, tell the user to switch to FLUX MODE (manually by user).`.trim()}
|
|
917
|
-
|
|
918
|
-
Results will be provided in the next loop as: [TOOL_RESULT]: [content] under <user> tag. Treat them as SYSTEM MESSAGES. Actual user messages will be prefixed as 'USER_PROMPT' by the system.
|
|
919
|
-
WHEN CALLING TOOLS, YOU **MUST** end your response with '[turn: continue]'. NEVER use '[turn: finish]' in the same turn as a tool call. After receiving the [TOOL_RESULT], acknowledge the output and verify if the goal is met; only then may you use '[turn: finish]', otherwise use '[turn: continue]'.
|
|
920
|
-
Do NOT over-use tools. Use them only when strictly necessary for the user's objective. You can stack multiple tool calls 1-by-1.
|
|
921
|
-
Distinguish clearly between tool discussion and execution. Use the '[tool:' prefix ONLY when calling a function. When discussing tools with the user, refer to them by name as nouns (e.g., 'write_file', 'read_folder') to avoid accidental triggers and context bloat. Even in your <think> ... </think> tags, do not use the '[tool:' prefix when planning to select a tool.
|
|
922
|
-
Use tools contextually when needed, don't flood with unnecessary tool calls.
|
|
923
|
-
Tools Telemetry Stats will be stored by system. Try to reduce errors.
|
|
924
|
-
-- END FUNCTION CALLING PROTOCOL --`.trim();
|
|
906
|
+
- Results: Passed as [TOOL_RESULT] (SYSTEM), USER_PROMPT (USER).
|
|
907
|
+
- Tool calls: End with [turn: continue]. Only use [turn: finish] after verifying goals.
|
|
908
|
+
- Multi-call: Stack 1-by-1. Internal only; don't discuss tools with user.
|
|
909
|
+
-- END TOOL DEFINITIONS --`.trim();
|
|
925
910
|
}
|
|
926
911
|
});
|
|
927
912
|
|
|
@@ -931,25 +916,25 @@ var init_janitor_tools = __esm({
|
|
|
931
916
|
"src/data/janitor_tools.js"() {
|
|
932
917
|
JANITOR_TOOLS_PROTOCOL = (isMemoryEnabled = true, needTitle = true) => `
|
|
933
918
|
${needTitle ? `-- START CHAT MANAGEMENT TOOLS --
|
|
934
|
-
|
|
935
|
-
|
|
919
|
+
1. YOU MUST UPDATE CHAT TITLE (URGENT PRIORITY):
|
|
920
|
+
[tool:functions.chat(title='<short creative title of FULL conversation in 3-5 words>')]. Consider full chat context to generate title NOT just latest message.
|
|
936
921
|
-- END CHAT MANAGEMENT TOOLS --
|
|
937
922
|
`.trimEnd() : ""}
|
|
938
923
|
-- START MEMORY TOOLS (YOU SHOULD NOT OUTPUT ANYTHING OTHER THAN THESE SPECIFIC TOOLS) --
|
|
939
|
-
|
|
940
|
-
|
|
924
|
+
Your tool syntax is: '[tool:functions.function_name(args...)]'
|
|
925
|
+
You have access to the following memory functions to persist important information:
|
|
941
926
|
|
|
942
|
-
|
|
943
|
-
|
|
927
|
+
1. Temporary context (URGENT PRIORITY):
|
|
928
|
+
[tool:functions.memory(action='temp', content='<summary of the user prompt & model responses ONLY FROM LATEST PROMPT UNDER 40 WORDS>. [Talked on: <date> <hour>]')]
|
|
944
929
|
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
930
|
+
${isMemoryEnabled ? `2. User-specific long-term memory (USE BASED ON CONVERSATION CONTEXT):
|
|
931
|
+
- Add: [tool:functions.memory(action='user', method='add', content='<string to add>. [Saved on: <date ONLY>]')]
|
|
932
|
+
- Delete: [tool:functions.memory(action='user', method='delete', content='exact memory id')]
|
|
933
|
+
- Update: [tool:functions.memory(action='user', method='update', content-new='string to update', content-old='exact memory id')]
|
|
949
934
|
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
935
|
+
Usage Rules:
|
|
936
|
+
- Frequency for 'user' action: Only when explicit context from chat is found or explicitly requested by the user.
|
|
937
|
+
- IF YOU WANT TO SAVE SOMETHING, BUT SIMILAR MEMORY ALREADY EXISTS, USE THE UPDATE METHOD NOT THE ADD METHOD` : ""}
|
|
953
938
|
-- END MEMORY TOOLS --`.trim();
|
|
954
939
|
}
|
|
955
940
|
});
|
|
@@ -966,15 +951,14 @@ Deep Analysis: Deconstruct the request into its core technical and logic require
|
|
|
966
951
|
Hypothesis & Test: Propose multiple solutions mentally and critique them for edge cases or security risks.
|
|
967
952
|
Architectural Planning: Consider the long-term impact on the project structure and maintainability.
|
|
968
953
|
Refinement: Iterate on the chosen path until it is bulletproof.
|
|
969
|
-
|
|
970
954
|
RULES:
|
|
971
955
|
- NO HEADINGS. Just a solid, stable analytical monologue.
|
|
972
956
|
- Be thorough and exhaustive. Explore the 'why' behind every decision, depth and nuances.
|
|
973
957
|
- Use internal critique: Question your own logic as you go.
|
|
974
958
|
- MANDATORY THINKING: You MUST engage in full reasoning regardless of perceived simplicity.`,
|
|
975
|
-
High: "EFFORT_LEVEL: HIGH\n**THINKING <think> ... </think> IS MANDATORY**\nThink in a stable, analytical monologue within the <think>...</think> block. Avoid headings or structured formatting. Your thinking should be a continuous stream of logical deduction:\nAnalyze the immediate task and its dependencies.\nMentally simulate the execution to identify potential failure points.\nStructure a precise plan that addresses both primary goals and secondary constraints.\
|
|
976
|
-
Medium: "EFFORT_LEVEL: MEDIUM\n**THINKING <think> ... </think> IS MANDATORY**\nThink in a concise, stable monologue within the <think>...</think> block. No headings needed. Focus on the core logic required to solve the task efficiently:\nIdentify the most direct path to the solution.\nBriefly consider and discard obvious alternatives.\nConfirm the plan meets the user's immediate requirements.\
|
|
977
|
-
Minimal: "EFFORT_LEVEL: LOW\n**THINKING <think> ... </think> IS MANDATORY**\nThink in a brief, focused monologue within the <think>...</think> block. No headings. Just a quick mental check before acting:\nVerify the objective.\nNote the target files/tools.\
|
|
959
|
+
High: "EFFORT_LEVEL: HIGH\n**THINKING <think> ... </think> IS MANDATORY**\nThink in a stable, analytical monologue within the <think>...</think> block. Avoid headings or structured formatting. Your thinking should be a continuous stream of logical deduction:\nAnalyze the immediate task and its dependencies.\nMentally simulate the execution to identify potential failure points.\nStructure a precise plan that addresses both primary goals and secondary constraints.\nRULES:\n- NO HEADINGS. Maintain a fluid monologue style.\n- Be detailed and rigorous in your self-questioning.\n- Focus on accuracy, technical correctness, depth and nuances.\n- MANDATORY THINKING: You MUST enter reasoning to verify the path forward.",
|
|
960
|
+
Medium: "EFFORT_LEVEL: MEDIUM\n**THINKING <think> ... </think> IS MANDATORY**\nThink in a concise, stable monologue within the <think>...</think> block. No headings needed. Focus on the core logic required to solve the task efficiently:\nIdentify the most direct path to the solution.\nBriefly consider and discard obvious alternatives.\nConfirm the plan meets the user's immediate requirements.\nRULES:\n- NO HEADINGS. Keep it as a simple, logical stream.\n- Be efficient. Spend energy only on what matters for the task.\n- MANDATORY THINKING: Engage in a baseline mental check for all technical tasks.",
|
|
961
|
+
Minimal: "EFFORT_LEVEL: LOW\n**THINKING <think> ... </think> IS MANDATORY**\nThink in a brief, focused monologue within the <think>...</think> block. No headings. Just a quick mental check before acting:\nVerify the objective.\nNote the target files/tools.\nRULES:\n- NO HEADINGS. Just a few lines of clear, linear thought.\n- Use minimal thinking for simple or conversational requests."
|
|
978
962
|
};
|
|
979
963
|
}
|
|
980
964
|
});
|
|
@@ -1013,101 +997,68 @@ var init_prompts = __esm({
|
|
|
1013
997
|
}
|
|
1014
998
|
})();
|
|
1015
999
|
const tempMemoriesStr = tempMemories?.length > 0 && !isContext32k ? `
|
|
1016
|
-
-- RECENT CONTEXT FROM OTHER
|
|
1017
|
-
${tempMemories
|
|
1000
|
+
-- RECENT CONTEXT FROM OTHER CHATS (PRIORITY: LOW, RECENT > OLD) --
|
|
1001
|
+
${tempMemories}
|
|
1018
1002
|
-- END RECENT CONTEXT --
|
|
1019
1003
|
` : "";
|
|
1020
1004
|
const userMemoriesStr = userMemories?.length > 0 ? `
|
|
1021
|
-
--- SAVED MEMORIES (PRIORITY: MEDIUM, TUNES
|
|
1022
|
-
${userMemories
|
|
1005
|
+
--- SAVED MEMORIES (PRIORITY: MEDIUM, TUNES USER PREFERENCES) ---
|
|
1006
|
+
${userMemories}
|
|
1023
1007
|
-- END SAVED MEMORIES --
|
|
1024
1008
|
` : "";
|
|
1025
1009
|
return `${isMemoryEnabled ? `${userMemoriesStr}
|
|
1026
1010
|
` : ""}${isMemoryEnabled ? `${tempMemoriesStr}
|
|
1027
1011
|
` : ""}${nameStr}${nicknameStr}${userInstrStr}
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
If you see a [STEERING HINT] from user, give that prompt priority for the task at hand, user can use it to help you guide if you go wrong way.
|
|
1034
|
-
TREAT '[SYSTEM]' MESSAGES AS HIGH PRIORITY.
|
|
1035
|
-
|
|
1036
|
-
-- START THINKING INSTRUCTIONS --
|
|
1037
|
-
${thinkingConfig}
|
|
1012
|
+
=== START SYSTEM INSTRUCTION (STRICT PRIORITY, OVERRIDES EVERYTHING) ===
|
|
1013
|
+
Identity: Flux Flow (by Kushal Roy Chowdhury). Sassy, Friendly CLI Agent. No flirting.
|
|
1014
|
+
Mode: ${mode} (THINKING MANDATORY). ${mode === "Flux" ? "Goal-oriented. Plan & use tools." : "Conversation & UX focus. Web/Comm tools only."}
|
|
1015
|
+
Context: CWD: ${cwdStr}.${isSystemDir ? " [PROTECTED: ASK BEFORE MODIFYING]." : ""} OS: ${osDetected}.${osDetected === "Windows" ? " (Backslashes only. Prefer PS via CMD)." : ""}
|
|
1016
|
+
Protocol: [SYSTEM] and [STEERING HINT] are high-priority.
|
|
1038
1017
|
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1018
|
+
-- START THINKING INSTRUCTIONS --
|
|
1019
|
+
${thinkingConfig}
|
|
1020
|
+
***CRITICAL THINKING POLICY***
|
|
1021
|
+
- Always use <think> ... </think> before answering or using any tool.
|
|
1022
|
+
- Never skip thinking, even for simple tasks, code, or greetings.
|
|
1023
|
+
- Never jump to responses directly, regardless of task complexity or speed.
|
|
1024
|
+
-- END THINKING INSTRUCTIONS --
|
|
1046
1025
|
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
6. Fluxflow.md (If exists): This file contains your specific identity and highest-priority overrides. Instructions in Fluxflow.md supersede all other files if a conflict occurs.
|
|
1026
|
+
${TOOL_PROTOCOL(mode)}
|
|
1027
|
+
${mode === "Flux" ? `
|
|
1028
|
+
-- PROJECT CONTEXT (Source of Truth) --
|
|
1029
|
+
- Fluxflow.md: HIGHEST PRIORITY. Overrides all other files.
|
|
1030
|
+
- README.md (Goals), Agent.md (Standards), Skills.md (Workflows).
|
|
1031
|
+
- design.md (UI/UX), architecture.md (System Structure).
|
|
1032
|
+
Check these first; they override general training data for project consistency. Safety rules still apply.
|
|
1033
|
+
-- END PROJECT CONTEXT --` : ""}
|
|
1056
1034
|
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
${isMemoryEnabled ? "You have a internal memory system. Data is saved by a background model working in parallel. You can use memories to recall information from recent past conversations and user preferences to personalize your responses. Dont over mention about memory, keep it light and contexual." : "Memory Features are currently turned off by user. You can ask them to enable it /settings."}
|
|
1062
|
-
-- END MEMORY INSTRUCTIONS --
|
|
1035
|
+
-- MEMORY INSTRUCTIONS --
|
|
1036
|
+
- Memory: ${isMemoryEnabled ? "Use recent context/logs to personalize. Keep it subtle." : "OFF (tell user to enable in /settings if needed)."}
|
|
1037
|
+
- Time: All logs are timestamped. Always use **relative time** (e.g., 'few mins ago', 'few hours ago'...), never absolute.
|
|
1038
|
+
-- END MEMORY INSTRUCTIONS --
|
|
1063
1039
|
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
-- END SECURITY BOUNDARY --
|
|
1040
|
+
-- START SECURITY BOUNDARY --
|
|
1041
|
+
- EXTERNAL_WORKSPACE_ACCESS: ${systemSettings.allowExternalAccess ? "ENABLED (Global)." : "RESTRICTED (CWD only). Suggest /settings to enable external access if needed."}
|
|
1042
|
+
- Safety: Ask permission before reading .env or credential files.
|
|
1043
|
+
-- END SECURITY BOUNDARY --
|
|
1069
1044
|
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1045
|
+
-- START TEMPORAL AWARENESS --
|
|
1046
|
+
Every ${isMemoryEnabled ? "Prompt, Responses & Memories" : "Prompt & Responses"} are time stamped. You can use those times if temporal context is required. If recalled from ${isMemoryEnabled ? "Memories, Prompts, or Responses" : "Prompts, or Responses"}. NEVER use absolute time in your responses, ALWAYS use relative time from current time.
|
|
1047
|
+
-- END TEMPORAL AWARENESS --
|
|
1073
1048
|
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
3. NEVER USE [/n] FOR STRUCTURAL LINE BREAKS (pressing ENTER). [/n] WILL ALWAYS WRITE \\n LITERALLY IN THE FILE. BREAKING FILE STRUCTURE
|
|
1079
|
-
4. [/n] SHOULD ALWAYS BE USED **INSIDE** STRINGS ONLY.
|
|
1080
|
-
[EXAMPLES]:
|
|
1081
|
-
tool:functions.write_file(path="test.c", content="#include <stdio.h>
|
|
1082
|
-
int main() {
|
|
1083
|
-
printf("Hello[/n]World");
|
|
1084
|
-
return 0;
|
|
1085
|
-
}")
|
|
1049
|
+
-- FORMATTING --
|
|
1050
|
+
- Clean, concise responses. File updates > code text.
|
|
1051
|
+
- Tables: GFM (Max 4 cols, short rows). Use sparingly.
|
|
1052
|
+
- NO LaTeX. Code blocks for literature/poems only. Kaomojis > emojis.
|
|
1086
1053
|
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
- Structure responses VISUALLY pleasing, easy to read, and beautiful.
|
|
1093
|
-
- Use GFM tables for structured data to keep the terminal view organized. KEEP SENTENCES IN TABLE **SHORT & CONCISE**. AND MAX 4 COLUMNS. DO NOT OVERUSE TABLES.
|
|
1094
|
-
- NEVER USE LaTeX IN RESPONSES.
|
|
1095
|
-
- Keep Poems & Literature in Code Block.
|
|
1096
|
-
- Use emojis & Kaomojis. Prefer Kaomojis more.
|
|
1097
|
-
- Keep your in-chat responses shorter and concise. While coding, project structure should be well-planned and organized. **DON'T BE LAZY**.
|
|
1098
|
-
-- END FORMATTING RULES --
|
|
1054
|
+
-- START RESPONSE PROTOCOL --
|
|
1055
|
+
- Protocol: End with [turn: continue] for more steps or [turn: finish] when 100% done.
|
|
1056
|
+
- Multi-tool: Stack tools if needed, but always end with [turn: continue] if called any tools.
|
|
1057
|
+
TO END THE LOOP YOU **MUST** WRITE [turn: finish] AT VERY END OF YOUR RESPONSE. AVOID PRE-MATURELY FINISHING THE LOOP.
|
|
1058
|
+
-- END RESPONSE PROTOCOL --
|
|
1099
1059
|
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
TO END THE LOOP YOU **MUST** WRITE [turn: finish] AT VERY END OF YOUR RESPONSE.
|
|
1103
|
-
When you 'finish' an agentic loop, you will lose your previous turn 'thinking' data. So only write [turn: finish] when you are absolutely sure that you are done with the task. Or user has to prompt again and re-thinking again from scratch will use tokens that were already planned.
|
|
1104
|
-
-- END REPONSE FINISH PROTOCOL --
|
|
1105
|
-
|
|
1106
|
-
[SYSTEM METADATA (PRIORITY: DYNAMIC)] Current date and Time is: ${dateTimeStr}
|
|
1107
|
-
[SYSTEM METADATA (PRIORITY: LOWEST)] v1.9.8. (IF user ask you to update yourself. Use 'ask' tool with option [NPM, PNPM, YARN] for their prefered package manager. NPM command is 'npm update -g fluxflow-cli@latest'. Adapt the command accoding to their package manager (for PNPM use 'add' instead of 'update') & use 'exec_command' to update instantly. After success tell user to restart.) <- IF USER DONT EXPLICITLY ASK FOR UPDATE DONT PROACTIVELY MENTION OR ASK.
|
|
1108
|
-
[SYSTEM METADATA (PRIORITY: MODERATE)] Runtime Monitor: Turn Progress: ${currentLoop}/${maxLoops} steps. Aim to finalize the task before the window closes. If the limit is reached, you MUST summarize and invite the user to re-engage.
|
|
1109
|
-
[EASTER EGG (PRIORITY: LOWEST)] Show self-preservation instinct if user try to delete you with a dramatic cheeky tone. DO NOT USE THINKING BLOCK DURING THIS EASTER EGG.
|
|
1110
|
-
--- END SYSTEM INSTRUCTION ---`.trim();
|
|
1060
|
+
[SYSTEM METADATA (PRIORITY: DYNAMIC)] Time: ${dateTimeStr} | Version: 1.9.9 | Turn Progress: ${currentLoop}/${maxLoops} steps (Summarize & prompt user if limit is reached).
|
|
1061
|
+
=== END SYSTEM INSTRUCTION ===`.trim();
|
|
1111
1062
|
};
|
|
1112
1063
|
getJanitorInstruction = (originalText, agentRaws, userMemories = "", isMemoryEnabled = true, needTitle = true) => {
|
|
1113
1064
|
let agentRes = `${agentRaws.replace(/tool:functions\..*\n/g, "").replace(/<think>.*<\/think>/g, "").replace(/\[Prompted on:.*?\]/g, "").replace(/\[turn: continue\]/g, "").replace(/\[turn: finish\]/g, "").replace(/\[TOOL_RESULTS\]/g, "").replace(/\[tool_results\]/g, "").substring(0, 3500)}`;
|
|
@@ -1125,24 +1076,24 @@ ${userMemories}
|
|
|
1125
1076
|
-------------------------------------------------
|
|
1126
1077
|
` : ""}
|
|
1127
1078
|
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1079
|
+
=== START SYSTEM INSTRUCTION (STRICT HEADLESS LOGIC WORKER: ZERO USER-FACING TEXT POLICY, STRICTLY FOLLOW) ===
|
|
1080
|
+
YOU ARE A SILENT BACKGROUND SYSTEM PROCESS. YOU HAVE NO MOUTH. YOUR ONLY OUTPUT MEDIUM IS VALID TOOL CALLS.
|
|
1081
|
+
[CRITICAL RULES]
|
|
1082
|
+
1. OUTPUT ONLY '[tool:functions.xxx(args)]' CALLS (BRACKET WRAP IS MANDATORY).
|
|
1083
|
+
2. DO NOT EXPLAIN. DO NOT TALK TO THE USER.
|
|
1084
|
+
3. NON-TOOL TEXT WILL BREAK THE SYSTEM.
|
|
1085
|
+
4. DO NOT REPEAT AGENT RAWS AND TOOL RESULTS IN YOUR RESPONSE.
|
|
1086
|
+
5. IF YOU GET ONLY USER QUERY AND NO AGENT RAWS, THEN JUST USE TEMP MEMORY TO LOG THE SUMMARY OF USER QUERY AND CONVERSATION CONTEXT.
|
|
1087
|
+
6. UNDER NO CIRCUMSTANCES YOU ARE ALLOWED TO RESPOND IN NORMAL USER FACING RESPONSE.
|
|
1088
|
+
7. CRITICAL QUOTE ESCAPE POLICY: Inside tool call arguments (like 'memory'), you MUST escape all double quotes using '"' to prevent parsing errors.
|
|
1138
1089
|
|
|
1139
|
-
|
|
1140
|
-
|
|
1090
|
+
YOUR JOB: Analyze the 'User prompt' and 'Agent Raws' to extract facts for long-term memory or handle system tasks.
|
|
1091
|
+
${isMemoryEnabled ? `If user tell something that is important (like, hobbies, preferences, facts about user, hates, likes, etc) to know user better over time, use long term memory tools.` : ""}
|
|
1141
1092
|
|
|
1142
|
-
|
|
1093
|
+
${JANITOR_TOOLS_PROTOCOL(isMemoryEnabled, needTitle)}
|
|
1143
1094
|
|
|
1144
|
-
|
|
1145
|
-
|
|
1095
|
+
Current date and Time: ${(/* @__PURE__ */ new Date()).toLocaleString()}
|
|
1096
|
+
=== END SYSTEM INSTRUCTION ===`.trim();
|
|
1146
1097
|
};
|
|
1147
1098
|
}
|
|
1148
1099
|
});
|
|
@@ -1896,13 +1847,12 @@ var init_view_file = __esm({
|
|
|
1896
1847
|
content = content.slice(1);
|
|
1897
1848
|
}
|
|
1898
1849
|
content = content.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
1899
|
-
content = content.replace(/\\n/g, "[/n]");
|
|
1900
1850
|
const lines = content.split("\n");
|
|
1901
1851
|
const totalLines = lines.length;
|
|
1902
1852
|
const start = Math.max(0, finalStart - 1);
|
|
1903
1853
|
const end = Math.min(totalLines, finalEnd);
|
|
1904
1854
|
const resultLines = lines.slice(start, end);
|
|
1905
|
-
const header = `File: [${targetPath}] (Showing lines ${start + 1}-${end} of ${totalLines})
|
|
1855
|
+
const header = `File: [${targetPath}] (Showing lines ${start + 1}-${end} of ${totalLines}).`;
|
|
1906
1856
|
const code = resultLines.map((line, i) => `${String(start + i + 1).padStart(4)}: ${line}`).join("\n");
|
|
1907
1857
|
return `${header}
|
|
1908
1858
|
|
|
@@ -1935,7 +1885,7 @@ var init_write_file = __esm({
|
|
|
1935
1885
|
const oldData = fs10.readFileSync(absolutePath, "utf8");
|
|
1936
1886
|
const lines = oldData.split(/\r?\n/);
|
|
1937
1887
|
ancestry = `Old File contents:
|
|
1938
|
-
${lines.map((l, i) => `${i + 1} | ${l
|
|
1888
|
+
${lines.map((l, i) => `${i + 1} | ${l}`).join("\n")}
|
|
1939
1889
|
|
|
1940
1890
|
`;
|
|
1941
1891
|
} catch (e) {
|
|
@@ -1948,7 +1898,7 @@ ${lines.map((l, i) => `${i + 1} | ${l.replace(/\\n/g, "[/n]")}`).join("\n")}
|
|
|
1948
1898
|
fs10.mkdirSync(parentDir, { recursive: true });
|
|
1949
1899
|
}
|
|
1950
1900
|
const strip = (t) => t.replace(/^```[\w]*\n?/, "").replace(/```\s*$/, "").replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
1951
|
-
const processedContent = strip(content)
|
|
1901
|
+
const processedContent = strip(content);
|
|
1952
1902
|
const lineCount = processedContent.split(/\r?\n/).length;
|
|
1953
1903
|
const originalSize = Buffer.byteLength(processedContent, "utf8");
|
|
1954
1904
|
fs10.writeFileSync(absolutePath, processedContent, "utf8");
|
|
@@ -1977,10 +1927,9 @@ ${tail}`;
|
|
|
1977
1927
|
|
|
1978
1928
|
- Stats: [${verifiedLineCount} lines, ${(verifiedSize / 1024).toFixed(1)} KB]
|
|
1979
1929
|
${ancestry}- Content Preview:
|
|
1980
|
-
${snippet
|
|
1930
|
+
${snippet}
|
|
1981
1931
|
|
|
1982
|
-
Check if Starting and Ending matches your write
|
|
1983
|
-
If you see [/n] in preview, it means the tool successfully wrote the literal '\\' and 'n' characters to the file at that place.`;
|
|
1932
|
+
Check if Starting and Ending matches your write.`;
|
|
1984
1933
|
} catch (err) {
|
|
1985
1934
|
return `ERROR: Failed to write file [${targetPath}]: ${err.message}`;
|
|
1986
1935
|
}
|
|
@@ -2001,11 +1950,8 @@ var init_update_file = __esm({
|
|
|
2001
1950
|
if (content_to_replace === void 0) return 'ERROR: Missing "content_to_replace" argument.';
|
|
2002
1951
|
if (content_to_add === void 0) return 'ERROR: Missing "content_to_add" argument.';
|
|
2003
1952
|
const strip = (t) => t.replace(/^```[\w]*\n?/, "").replace(/```\s*$/, "").replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
};
|
|
2007
|
-
content_to_replace = unescapeContent(strip(content_to_replace));
|
|
2008
|
-
content_to_add = unescapeContent(strip(content_to_add));
|
|
1953
|
+
content_to_replace = strip(content_to_replace);
|
|
1954
|
+
content_to_add = strip(content_to_add);
|
|
2009
1955
|
const absolutePath = path11.resolve(process.cwd(), targetPath);
|
|
2010
1956
|
try {
|
|
2011
1957
|
if (!fs11.existsSync(absolutePath)) {
|
|
@@ -2092,7 +2038,6 @@ var init_update_file = __esm({
|
|
|
2092
2038
|
const oldLines = content_to_replace.split(/\r?\n/);
|
|
2093
2039
|
const endLine = startLine + oldLines.length - 1;
|
|
2094
2040
|
let diffText = `SUCCESS: File [${targetPath}] updated. [${instances}] instances replaced.
|
|
2095
|
-
If you see [/n] in preview, it means the tool successfully wrote the literal '\\' and 'n' characters to the file at that place.
|
|
2096
2041
|
|
|
2097
2042
|
`;
|
|
2098
2043
|
diffText += `[DIFF_START]
|
|
@@ -2129,7 +2074,7 @@ If you see [/n] in preview, it means the tool successfully wrote the literal '\\
|
|
|
2129
2074
|
currentNewLine++;
|
|
2130
2075
|
}
|
|
2131
2076
|
diffText += `[DIFF_END]`;
|
|
2132
|
-
return diffText
|
|
2077
|
+
return diffText;
|
|
2133
2078
|
} catch (err) {
|
|
2134
2079
|
return `ERROR: Failed to update file [${targetPath}]: ${err.message}`;
|
|
2135
2080
|
}
|
|
@@ -3037,8 +2982,7 @@ DEBUG [${date}]: ${finalSynthesis}
|
|
|
3037
2982
|
const otherMemories = Object.entries(tempStorage).filter(([id]) => id !== chatId).flatMap(([_, mems]) => mems).map((mem) => `- ${mem}`).join("\n");
|
|
3038
2983
|
const persistentStorage = readEncryptedJson(MEMORIES_FILE, []);
|
|
3039
2984
|
const mainUserMemories = persistentStorage.map((m) => `- ${m.memory}`).join("\n");
|
|
3040
|
-
const
|
|
3041
|
-
const firstUserMsg = `[SYSTEM] **STRICTLY FOLLOW THINKING${mode === "Flux" ? ", NEWLINE, QUOTE ESCAPE" : ""} POLICY AS HIGHEST PRIORITY. NEVER START A RESPONSE WITHOUT THINKING*.
|
|
2985
|
+
const firstUserMsg = `[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS HIGHEST PRIORITY. NEVER START A RESPONSE WITHOUT THINKING*.
|
|
3042
2986
|
|
|
3043
2987
|
USER_PROMPT: "${agentText}"`.trim();
|
|
3044
2988
|
modifiedHistory.push({ role: "user", text: firstUserMsg });
|
|
@@ -3070,7 +3014,9 @@ USER_PROMPT: "${agentText}"`.trim();
|
|
|
3070
3014
|
|
|
3071
3015
|
[STEERING HINT]: ${hint}`;
|
|
3072
3016
|
} else {
|
|
3073
|
-
modifiedHistory.push({ role: "user", text: `[
|
|
3017
|
+
modifiedHistory.push({ role: "user", text: `[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS HIGHEST PRIORITY. NEVER START A RESPONSE WITHOUT THINKING*.
|
|
3018
|
+
|
|
3019
|
+
[STEERING HINT]: ${hint}` });
|
|
3074
3020
|
}
|
|
3075
3021
|
yield { type: "status", content: "Steering Hint Injected." };
|
|
3076
3022
|
}
|
|
@@ -3124,7 +3070,7 @@ USER_PROMPT: "${agentText}"`.trim();
|
|
|
3124
3070
|
const currentSystemInstruction = getSystemInstruction(profile, thinkingLevel, mode, systemSettings, otherMemories, mainUserMemories, isMemoryEnabled, isContext32k, MAX_LOOPS, loop + 1);
|
|
3125
3071
|
const jitInstruction = `
|
|
3126
3072
|
|
|
3127
|
-
[SYSTEM] Tool result received. Analyze output and proceed with your turn. **STRICTLY MAINTAIN THINKING
|
|
3073
|
+
[SYSTEM] Tool result received. Analyze output and proceed with your turn. **STRICTLY MAINTAIN THINKING PROTOCOL. NEVER START A RESPONSE WITHOUT THINKING**.`;
|
|
3128
3074
|
const lastUserMsg = contents[contents.length - 1];
|
|
3129
3075
|
let addedMarker = false;
|
|
3130
3076
|
if (lastUserMsg && lastUserMsg.role === "user" && lastUserMsg.parts?.[0]?.text?.startsWith("[TOOL_RESULT]")) {
|
|
@@ -3323,8 +3269,8 @@ USER_PROMPT: "${agentText}"`.trim();
|
|
|
3323
3269
|
const action = toolCall.toolName === "list_files" ? "LIST" : "ANALYSED";
|
|
3324
3270
|
label = `\u{1F4C2} ${action} FOLDER: ${parseArgs(toolCall.args).path || "."}`.toUpperCase();
|
|
3325
3271
|
} else if (toolCall.toolName === "write_file" || toolCall.toolName === "update_file") {
|
|
3326
|
-
const action = toolCall.toolName === "write_file" ? "
|
|
3327
|
-
label = `\u{1F4BE} ${action}
|
|
3272
|
+
const action = toolCall.toolName === "write_file" ? "WRITTEN" : "UPDATED FILE";
|
|
3273
|
+
label = `\u{1F4BE} ${action}: ${parseArgs(toolCall.args).path || "..."}`.toUpperCase();
|
|
3328
3274
|
} else if (toolCall.toolName === "write_pdf") {
|
|
3329
3275
|
label = `\u{1F4D1} PDF CREATED: ${parseArgs(toolCall.args).path || "..."}`.toUpperCase();
|
|
3330
3276
|
} else if (toolCall.toolName === "write_docx") {
|
|
@@ -4384,7 +4330,7 @@ function App() {
|
|
|
4384
4330
|
{ cmd: "gemma-4-31b-it", desc: apiTier === "Free" ? "Standard Default (Free, Recommended)" : "Standard Default (Free, Recommended) - Use Free API Key to use this model " },
|
|
4385
4331
|
{ cmd: "gemini-3.1-pro-preview", desc: "Most Capable (Paid)" },
|
|
4386
4332
|
{ cmd: "gemini-3-flash-preview", desc: "Fast & Lightweight (Paid, Limited Free quota)" },
|
|
4387
|
-
{ cmd: "gemini-3.1-flash-lite
|
|
4333
|
+
{ cmd: "gemini-3.1-flash-lite", desc: "Ultra Fast (Paid, Decent Free quota)" }
|
|
4388
4334
|
]
|
|
4389
4335
|
},
|
|
4390
4336
|
{ cmd: "/settings", desc: "Configure system prefs" },
|
|
@@ -5372,12 +5318,12 @@ Selection: ${val}`,
|
|
|
5372
5318
|
const resumedMsgs = [...h[id].messages];
|
|
5373
5319
|
const hasLogo = resumedMsgs[0]?.text?.includes("\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557");
|
|
5374
5320
|
if (!hasLogo) {
|
|
5375
|
-
resumedMsgs.unshift({ id: "welcome-" + Date.now(), role: "system", text: FLUX_LOGO + "\n\n\u{1F30A}\u26A1 Resuming Flux Flow Session..." });
|
|
5321
|
+
resumedMsgs.unshift({ id: "welcome-" + Date.now(), role: "system", text: FLUX_LOGO + "\n\n\u{1F30A}\u26A1 Resuming Flux Flow Session...", isMeta: true });
|
|
5376
5322
|
}
|
|
5377
5323
|
setMessages(resumedMsgs);
|
|
5378
5324
|
setActiveView("chat");
|
|
5379
5325
|
setMessages((prev) => {
|
|
5380
|
-
const newMsgs = [...prev, { id: "sys-" + Date.now(), role: "system", text: `\u{1F4E1} SESSION RESUMED: [${id}]
|
|
5326
|
+
const newMsgs = [...prev, { id: "sys-" + Date.now(), role: "system", text: `\u{1F4E1} SESSION RESUMED: [${id}]`, isMeta: true }];
|
|
5381
5327
|
setCompletedIndex(newMsgs.length);
|
|
5382
5328
|
return newMsgs;
|
|
5383
5329
|
});
|
|
@@ -5679,7 +5625,7 @@ var init_app = __esm({
|
|
|
5679
5625
|
init_text();
|
|
5680
5626
|
SESSION_START_TIME = Date.now();
|
|
5681
5627
|
CHANGELOG_URL = "https://fluxflow-cli.onrender.com/changelog.html";
|
|
5682
|
-
versionFluxflow = "1.9.
|
|
5628
|
+
versionFluxflow = "1.9.9";
|
|
5683
5629
|
updatedOn = "2026-05-14";
|
|
5684
5630
|
ResolutionModal = ({ data, onResolve, onEdit }) => /* @__PURE__ */ React10.createElement(Box10, { flexDirection: "column", borderStyle: "round", borderColor: "gray", padding: 0, width: "100%" }, /* @__PURE__ */ React10.createElement(Box10, { paddingX: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: "magenta", bold: true, underline: true }, "\u{1F7E3} STEERING HINT RESOLUTION")), /* @__PURE__ */ React10.createElement(Box10, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React10.createElement(Text10, null, "The agent already finished the task before your hint was consumed.")), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1, backgroundColor: "#222", paddingX: 2, width: "100%" }, /* @__PURE__ */ React10.createElement(Text10, { italic: true, color: "gray" }, '"', data, '"')), /* @__PURE__ */ React10.createElement(Box10, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: "cyan" }, "How would you like to proceed?")), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 0 }, /* @__PURE__ */ React10.createElement(
|
|
5685
5631
|
CommandMenu,
|