fluxflow-cli 2.8.4 → 2.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.
package/TOOLS.md CHANGED
@@ -1,95 +1,95 @@
1
- # 🧰 Agent Tools & Capabilities
2
-
3
- Flux Flow provides a robust set of tools that allow the AI to interact with the file system, execute code, and search the web. The availability of these tools depends on the active operating mode.
4
-
5
- ## Tool Availability by Mode
6
-
7
- | Tool Category | Flux Mode (Dev) | Flow Mode (Chat) |
8
- | :--- | :---: | :---: |
9
- | **Communication (Ask)** | ✅ | ✅ |
10
- | **Web Search & Scrape** | ✅ | ✅ |
11
- | **File System (Read/Write)** | ✅ | ❌ |
12
- | **Terminal Execution** | ✅ | ❌ |
13
- | **Search Keyword** | ✅ | ❌ |
14
- | **File Map** | ✅ | ❌ |
15
- | **Todo (Planning)** | ✅ | ❌ |
16
- | **Creative (PDF/DOCX/Image)** | ❌ | ✅ |
17
-
18
- ---
19
-
20
- ## Tool Protocol
21
-
22
- FluxFlow uses a transparent, string-based protocol for tool dispatching:
23
- `[tool:functions.ToolName(arg1="value", arg2=123)]`
24
-
25
- ---
26
-
27
- ## Communication Tools
28
-
29
- ### `Ask`
30
- - **Purpose**: Ambiguity Resolution.
31
- - **Triggers**: Mandatory for Path Divergence, Security concerns, or Risk Mitigation.
32
- - **Usage**: Suggests up to 4 best options; does not ask for open-ended preferences.
33
-
34
- ---
35
-
36
- ## Web Tools
37
-
38
- ### `WebSearch`
39
- - **Purpose**: Proactive search for unknown topics.
40
- - **Limit**: 3-10 results.
41
-
42
- ### `WebScrape`
43
- - **Purpose**: Deep-dive research into specific webpages, documentation, or APIs.
44
-
45
- ---
46
-
47
- ## Workspace Tools (Flux Mode Only)
48
-
49
- ### `ReadFile`
50
- - **Purpose**: Reads file content with support for line ranges.
51
- - **Multimodal**: Supports images and documents.
52
-
53
- ### `FileMap`
54
- - **Purpose**: Shows file structure, dependencies, functions, and variable maps. More token-efficient than ReadFile.
55
-
56
- ### `ReadFolder`
57
- - **Purpose**: Provides detailed directory statistics.
58
-
59
- ### `PatchFile` (UpdateFile)
60
- - **Purpose**: Surgical patching of code.
61
- - **Usage**: Supports multiple patches in a single call to prevent spam. MUST VERIFY DIFF.
62
-
63
- ### `WriteFile`
64
- - **Purpose**: Creates or overwrites files.
65
- - **Safety**: Prefers PatchFile if the file already exists.
66
-
67
- ### `SearchKeyword`
68
- - **Purpose**: Global project search for definitions or logic.
69
-
70
- ### `Run` (exec_command)
71
- - **Purpose**: Runs shell commands (PowerShell/CMD on Windows, Bash on Unix).
72
- - **Safety**: Restricted to workspace directory unless explicitly allowed. Irreversible operations require user approval.
73
-
74
- ### `Todo`
75
- - **Purpose**: Manages an internal task list (`todo.md`) to keep goals consistent during long tasks.
76
- - **Methods**: `create`, `append`, `check`.
77
-
78
- ---
79
-
80
- ## Creative Tools (Flow Mode Only)
81
-
82
- ### `WritePDF`
83
- - **Purpose**: Generates high-fidelity, branded PDF documents from HTML/CSS.
84
-
85
- ### `WriteDoc`
86
- - **Purpose**: Creates professional Word documents (.docx).
87
-
88
- ### `GenerateImage`
89
- - **Purpose**: Creates high-fidelity images via AI.
90
-
91
- ---
92
-
93
- ## Memory Management
94
-
95
- Managed primarily by the background **Janitor** model to maintain persistent user context and session summaries without bloating the reasoning loop.
1
+ # 🧰 Agent Tools & Capabilities
2
+
3
+ Flux Flow provides a robust set of tools that allow the AI to interact with the file system, execute code, and search the web. The availability of these tools depends on the active operating mode.
4
+
5
+ ## Tool Availability by Mode
6
+
7
+ | Tool Category | Flux Mode (Dev) | Flow Mode (Chat) |
8
+ | :--- | :---: | :---: |
9
+ | **Communication (Ask)** | ✅ | ✅ |
10
+ | **Web Search & Scrape** | ✅ | ✅ |
11
+ | **File System (Read/Write)** | ✅ | ❌ |
12
+ | **Terminal Execution** | ✅ | ❌ |
13
+ | **Search Keyword** | ✅ | ❌ |
14
+ | **File Map** | ✅ | ❌ |
15
+ | **Todo (Planning)** | ✅ | ❌ |
16
+ | **Creative (PDF/DOCX/Image)** | ❌ | ✅ |
17
+
18
+ ---
19
+
20
+ ## Tool Protocol
21
+
22
+ FluxFlow uses a transparent, string-based protocol for tool dispatching:
23
+ `[tool:functions.ToolName(arg1="value", arg2=123)]`
24
+
25
+ ---
26
+
27
+ ## Communication Tools
28
+
29
+ ### `Ask`
30
+ - **Purpose**: Ambiguity Resolution.
31
+ - **Triggers**: Mandatory for Path Divergence, Security concerns, or Risk Mitigation.
32
+ - **Usage**: Suggests up to 4 best options; does not ask for open-ended preferences.
33
+
34
+ ---
35
+
36
+ ## Web Tools
37
+
38
+ ### `WebSearch`
39
+ - **Purpose**: Proactive search for unknown topics.
40
+ - **Limit**: 3-10 results.
41
+
42
+ ### `WebScrape`
43
+ - **Purpose**: Deep-dive research into specific webpages, documentation, or APIs.
44
+
45
+ ---
46
+
47
+ ## Workspace Tools (Flux Mode Only)
48
+
49
+ ### `ReadFile`
50
+ - **Purpose**: Reads file content with support for line ranges.
51
+ - **Multimodal**: Supports images and documents.
52
+
53
+ ### `FileMap`
54
+ - **Purpose**: Shows file structure, dependencies, functions, and variable maps. More token-efficient than ReadFile.
55
+
56
+ ### `ReadFolder`
57
+ - **Purpose**: Provides detailed directory statistics.
58
+
59
+ ### `PatchFile` (UpdateFile)
60
+ - **Purpose**: Surgical patching of code.
61
+ - **Usage**: Supports multiple patches in a single call to prevent spam. MUST VERIFY DIFF.
62
+
63
+ ### `WriteFile`
64
+ - **Purpose**: Creates or overwrites files.
65
+ - **Safety**: Prefers PatchFile if the file already exists.
66
+
67
+ ### `SearchKeyword`
68
+ - **Purpose**: Global project search for definitions or logic.
69
+
70
+ ### `Run` (exec_command)
71
+ - **Purpose**: Runs shell commands (PowerShell/CMD on Windows, Bash on Unix).
72
+ - **Safety**: Restricted to workspace directory unless explicitly allowed. Irreversible operations require user approval.
73
+
74
+ ### `Todo`
75
+ - **Purpose**: Manages an internal task list (`todo.md`) to keep goals consistent during long tasks.
76
+ - **Methods**: `create`, `append`, `check`.
77
+
78
+ ---
79
+
80
+ ## Creative Tools (Flow Mode Only)
81
+
82
+ ### `WritePDF`
83
+ - **Purpose**: Generates high-fidelity, branded PDF documents from HTML/CSS.
84
+
85
+ ### `WriteDoc`
86
+ - **Purpose**: Creates professional Word documents (.docx).
87
+
88
+ ### `GenerateImage`
89
+ - **Purpose**: Creates high-fidelity images via AI.
90
+
91
+ ---
92
+
93
+ ## Memory Management
94
+
95
+ Managed primarily by the background **Janitor** model to maintain persistent user context and session summaries without bloating the reasoning loop.
package/UI_FEATURES.md CHANGED
@@ -1,91 +1,91 @@
1
- # 🎮 User Interface & Interaction Features
2
-
3
- Flux Flow is designed to be a high-performance terminal application. Beyond basic chat, it includes a variety of advanced UI features and human-in-the-loop controls to keep you in command of the agent.
4
-
5
- ## ⌨️ Command System
6
-
7
- You can control the application using `/` commands directly in the chat input:
8
-
9
- - **/mode [flux|flow]**: Quickly switch between **Flux** (Dev) and **Flow** (Chat) modes.
10
- - **/thinking [fast|low|medium|high|max]**: Adjust reasoning depth.
11
- - **/model [name]**: Choose which AI model to use for the main interaction.
12
- - **/key**: Open the API Key management view to update or remove your credentials.
13
- - **/settings**: Access the system configuration menu.
14
- - **/profile**: Update your name, nickname, and custom instructions.
15
- - **/update**: Update Flux Flow to the latest version.
16
- - **/memory**: View and manage the persistent memories extracted by the Janitor.
17
- - **/resume <chat-id>**: Switch back to a previous conversation.
18
- - **/changelog**: Open the project's changelog in your default browser.
19
- - **/help**: List all available commands.
20
-
21
- ## 📁 External Data Sanctuary (Redirection)
22
-
23
- Flux Flow allows you to "Anchor" your data outside of the default user directory. This is perfect for users who want to keep their logs, chat history, and encrypted memories on an external drive, a VeraCrypt volume, or a specific project folder.
24
-
25
- - **How to Enable**: Open `/settings` and toggle **Use External Data**.
26
- - **Portability**: Once set, the application will synchronously "pivot" all data operations to your specified `externalDataPath` upon startup.
27
- - **Privacy**: Keeps sensitive data off your primary system drive.
28
-
29
- ## 🧠 Thinking Levels & Visualization
30
-
31
- Flux Flow separates the model's "internal monologue" (reasoning) from its final response using `<think>` tags.
32
-
33
- - **Thinking Levels**: Depending on the mode, you can choose from **Fast**, **Low**, **Medium**, **High**, or **xHigh**. Higher levels allow the agent more "space" to reason through complex architecture or debugging problems.
34
-
35
- ## ⚡ Interactive Sub-Terminal
36
-
37
- Flux Flow features a high-fidelity, interactive sub-terminal that allows you to engage with commands spawned by the agent in real-time.
38
-
39
- - **Live Interaction**: When an agent executes a command (like `npm init`, `git commit`, or a custom script), the terminal output appears in a dedicated box.
40
- - **Focus Toggling (`TAB`)**: While a terminal is live, you can press **`TAB`** to shift your keyboard focus from the chat prompt directly into the terminal.
41
- - **Visual Feedback**:
42
- - **Yellow Glow**: When the terminal is focused, its border changes to a "Double Yellow" style to indicate it is capturing input.
43
- - **Status Indicator**: The footer will change from `● LIVE` to `▶ TERMINAL FOCUSED`.
44
- - **Cross-Platform Compatibility**: The input bridge automatically detects your OS and sends the correct line endings (`\r\n` for Windows, `\n` for Unix), ensuring that interactive prompts like `y/n` work seamlessly across environments.
45
- - **Input Mirroring**: Your keystrokes are mirrored in the terminal box in real-time, providing an IDE-grade responsive feel.
46
-
47
- > [!TIP]
48
- > Use the Interactive Sub-Terminal to handle authentication prompts, confirmation dialogs, or to manually steering a long-running process without leaving the Flux Flow interface.
49
-
50
- ## 🛡️ Human-in-the-Loop (HITL) Verification
51
-
52
- Security and safety are paramount when an AI has access to your file system and terminal. Flux Flow implements several layers of verification:
53
-
54
- ### Tool Approval
55
- By default, the agent **cannot** execute dangerous actions without your consent.
56
- - **Terminal Approval**: If the agent attempts to run a shell command (`exec_command`), a dedicated approval screen appears showing the exact command. You can **Allow** or **Deny** the execution.
57
- - **File Approval**: Similar to terminal commands, writing or updating files requires manual approval unless configured otherwise.
58
- - **Safe Commands**: Basic read-only commands (like `ls`, `git status`, `pwd`) are automatically allowed to minimize friction.
59
-
60
- ### Auto-Execution (Advanced)
61
- For power users, **YOLO Mode** can be enabled in `/settings`.
62
- - **⚠️ Warning**: This allows the agent to run any tool and execute any command autonomously.
63
- - **External Access**: You can also toggle whether the agent is allowed to access files outside of its current working directory.
64
- - **Manual Commad Control**: Specify which commands you want the agent to auto-execute, manually approve or auto-deny.
65
- - **Network Sandboxing**: Turn off network access in integrated terminal.
66
-
67
- ## 🔄 Steering & Resolution
68
-
69
- ### Real-time Steering
70
- If you realize the agent is going down the wrong path *while* it is in an agentic loop, you can provide "Steering Hints." The system will inject your feedback into the next loop to course-correct the agent.
71
-
72
- ### Resolution Modal
73
- If the agent finishes its task just as you send a steering hint, a **Resolution Modal** appears. It asks if you want to:
74
- - **Send Anyway**: Start a new loop with your feedback.
75
- - **Edit Prompt**: Refine your feedback before sending.
76
-
77
- ## 📊 Status Bar & Feedback
78
- The bottom of the screen features a dynamic status bar showing:
79
- - **Active Mode** (Flux/Flow)
80
- - **Thinking Level**
81
- - **Token Usage**: Real-time tracking of tokens used in the current session.
82
- - **Agentic Loops**: Counters showing how many times the agent has "looped" to solve the current task.
83
- - **API Status**: Visual feedback when the model is thinking or executing a tool.
84
-
85
- ## 🚑 System Integrity & Self-Healing
86
-
87
- Flux Flow is a "Self-Healing" agent. It actively monitors its own environment to ensure all complex dependencies (like the Chromium engine for PDF generation) are ready for action.
88
-
89
- - **Startup Integrity Check**: On launch, Flux performs a "Heartbeat Check" on its internal engines.
90
- - **Automatic Recovery**: If a dependency is missing, you will see a `🔧 [SYSTEM] Initializing...` message. Flux will autonomously download and configure the required binaries using `pnpm` or `npx` fallbacks, keeping you informed every step of the way.
1
+ # 🎮 User Interface & Interaction Features
2
+
3
+ Flux Flow is designed to be a high-performance terminal application. Beyond basic chat, it includes a variety of advanced UI features and human-in-the-loop controls to keep you in command of the agent.
4
+
5
+ ## ⌨️ Command System
6
+
7
+ You can control the application using `/` commands directly in the chat input:
8
+
9
+ - **/mode [flux|flow]**: Quickly switch between **Flux** (Dev) and **Flow** (Chat) modes.
10
+ - **/thinking [fast|low|medium|high|max]**: Adjust reasoning depth.
11
+ - **/model [name]**: Choose which AI model to use for the main interaction.
12
+ - **/key**: Open the API Key management view to update or remove your credentials.
13
+ - **/settings**: Access the system configuration menu.
14
+ - **/profile**: Update your name, nickname, and custom instructions.
15
+ - **/update**: Update Flux Flow to the latest version.
16
+ - **/memory**: View and manage the persistent memories extracted by the Janitor.
17
+ - **/resume <chat-id>**: Switch back to a previous conversation.
18
+ - **/changelog**: Open the project's changelog in your default browser.
19
+ - **/help**: List all available commands.
20
+
21
+ ## 📁 External Data Sanctuary (Redirection)
22
+
23
+ Flux Flow allows you to "Anchor" your data outside of the default user directory. This is perfect for users who want to keep their logs, chat history, and encrypted memories on an external drive, a VeraCrypt volume, or a specific project folder.
24
+
25
+ - **How to Enable**: Open `/settings` and toggle **Use External Data**.
26
+ - **Portability**: Once set, the application will synchronously "pivot" all data operations to your specified `externalDataPath` upon startup.
27
+ - **Privacy**: Keeps sensitive data off your primary system drive.
28
+
29
+ ## 🧠 Thinking Levels & Visualization
30
+
31
+ Flux Flow separates the model's "internal monologue" (reasoning) from its final response using `<think>` tags.
32
+
33
+ - **Thinking Levels**: Depending on the mode, you can choose from **Fast**, **Low**, **Medium**, **High**, or **xHigh**. Higher levels allow the agent more "space" to reason through complex architecture or debugging problems.
34
+
35
+ ## ⚡ Interactive Sub-Terminal
36
+
37
+ Flux Flow features a high-fidelity, interactive sub-terminal that allows you to engage with commands spawned by the agent in real-time.
38
+
39
+ - **Live Interaction**: When an agent executes a command (like `npm init`, `git commit`, or a custom script), the terminal output appears in a dedicated box.
40
+ - **Focus Toggling (`TAB`)**: While a terminal is live, you can press **`TAB`** to shift your keyboard focus from the chat prompt directly into the terminal.
41
+ - **Visual Feedback**:
42
+ - **Yellow Glow**: When the terminal is focused, its border changes to a "Double Yellow" style to indicate it is capturing input.
43
+ - **Status Indicator**: The footer will change from `● LIVE` to `▶ TERMINAL FOCUSED`.
44
+ - **Cross-Platform Compatibility**: The input bridge automatically detects your OS and sends the correct line endings (`\r\n` for Windows, `\n` for Unix), ensuring that interactive prompts like `y/n` work seamlessly across environments.
45
+ - **Input Mirroring**: Your keystrokes are mirrored in the terminal box in real-time, providing an IDE-grade responsive feel.
46
+
47
+ > [!TIP]
48
+ > Use the Interactive Sub-Terminal to handle authentication prompts, confirmation dialogs, or to manually steering a long-running process without leaving the Flux Flow interface.
49
+
50
+ ## 🛡️ Human-in-the-Loop (HITL) Verification
51
+
52
+ Security and safety are paramount when an AI has access to your file system and terminal. Flux Flow implements several layers of verification:
53
+
54
+ ### Tool Approval
55
+ By default, the agent **cannot** execute dangerous actions without your consent.
56
+ - **Terminal Approval**: If the agent attempts to run a shell command (`exec_command`), a dedicated approval screen appears showing the exact command. You can **Allow** or **Deny** the execution.
57
+ - **File Approval**: Similar to terminal commands, writing or updating files requires manual approval unless configured otherwise.
58
+ - **Safe Commands**: Basic read-only commands (like `ls`, `git status`, `pwd`) are automatically allowed to minimize friction.
59
+
60
+ ### Auto-Execution (Advanced)
61
+ For power users, **YOLO Mode** can be enabled in `/settings`.
62
+ - **⚠️ Warning**: This allows the agent to run any tool and execute any command autonomously.
63
+ - **External Access**: You can also toggle whether the agent is allowed to access files outside of its current working directory.
64
+ - **Manual Commad Control**: Specify which commands you want the agent to auto-execute, manually approve or auto-deny.
65
+ - **Network Sandboxing**: Turn off network access in integrated terminal.
66
+
67
+ ## 🔄 Steering & Resolution
68
+
69
+ ### Real-time Steering
70
+ If you realize the agent is going down the wrong path *while* it is in an agentic loop, you can provide "Steering Hints." The system will inject your feedback into the next loop to course-correct the agent.
71
+
72
+ ### Resolution Modal
73
+ If the agent finishes its task just as you send a steering hint, a **Resolution Modal** appears. It asks if you want to:
74
+ - **Send Anyway**: Start a new loop with your feedback.
75
+ - **Edit Prompt**: Refine your feedback before sending.
76
+
77
+ ## 📊 Status Bar & Feedback
78
+ The bottom of the screen features a dynamic status bar showing:
79
+ - **Active Mode** (Flux/Flow)
80
+ - **Thinking Level**
81
+ - **Token Usage**: Real-time tracking of tokens used in the current session.
82
+ - **Agentic Loops**: Counters showing how many times the agent has "looped" to solve the current task.
83
+ - **API Status**: Visual feedback when the model is thinking or executing a tool.
84
+
85
+ ## 🚑 System Integrity & Self-Healing
86
+
87
+ Flux Flow is a "Self-Healing" agent. It actively monitors its own environment to ensure all complex dependencies (like the Chromium engine for PDF generation) are ready for action.
88
+
89
+ - **Startup Integrity Check**: On launch, Flux performs a "Heartbeat Check" on its internal engines.
90
+ - **Automatic Recovery**: If a dependency is missing, you will see a `🔧 [SYSTEM] Initializing...` message. Flux will autonomously download and configure the required binaries using `pnpm` or `npx` fallbacks, keeping you informed every step of the way.
91
91
  - **Silent Maintenance**: Once the engine is ready, you'll receive a `✅ [SYSTEM] All dependencies installed successfully.` confirmation.
package/dist/fluxflow.js CHANGED
@@ -1591,8 +1591,7 @@ var init_ChatLayout = __esm({
1591
1591
  formatThinkText = (cleaned, columns = 80) => {
1592
1592
  if (!cleaned) return null;
1593
1593
  const availableWidth = columns - 10;
1594
- const wrapped = wrapText(cleaned.trim(), availableWidth);
1595
- return /* @__PURE__ */ React3.createElement(Box3, { width: "100%" }, /* @__PURE__ */ React3.createElement(Text3, { italic: true }, /* @__PURE__ */ React3.createElement(InlineMarkdown, { text: wrapped, color: "gray" })));
1594
+ return /* @__PURE__ */ React3.createElement(Box3, { width: "100%", flexDirection: "column" }, /* @__PURE__ */ React3.createElement(MarkdownText, { text: cleaned.trim(), color: "gray", columns: availableWidth, italic: true }));
1596
1595
  };
1597
1596
  parseMathSymbols = (content) => {
1598
1597
  return content.replace(/\\multiply|\\mul|\\times/g, "\xD7").replace(/\\div/g, "\xF7").replace(/\\cdot/g, "\u22C5").replace(/\\infty/g, "\u221E").replace(/\\pm/g, "\xB1").replace(/\\leq/g, "\u2264").replace(/\\geq/g, "\u2265").replace(/\\neq/g, "\u2260").replace(/\\sqrt\s*\{([^}]+)\}/g, "\u221A($1)").replace(/\\sqrt\s*(\w+|\d+)/g, "\u221A($1)").replace(/\\alpha/g, "\u03B1").replace(/\\beta/g, "\u03B2").replace(/\\theta/g, "\u03B8").replace(/\\pi/g, "\u03C0").replace(/\\approx/g, "\u2248").replace(/\\Delta/g, "\u0394").replace(/\\sigma/g, "\u03C3").replace(/\\sum/g, "\u03A3").replace(/\\prod/g, "\u03A0").replace(/\\rightarrow|\\to/g, "\u2192").replace(/\\left\b|\\right\b/g, "").replace(/\\left\(|\\right\)/g, (match) => match.includes("left") ? "(" : ")").replace(/\\left\[|\\right\]/g, (match) => match.includes("left") ? "[" : "]").replace(/\\\{|\\\}/g, (match) => match.includes("{") ? "{" : "}").replace(/\\text\s*\{([^}]+)\}/g, "$1").replace(/\\text\s+(\w+)/g, "$1").replace(/\\%/g, "%");
@@ -1618,10 +1617,10 @@ var init_ChatLayout = __esm({
1618
1617
  return p;
1619
1618
  }));
1620
1619
  };
1621
- InlineMarkdown = React3.memo(({ text, color }) => {
1620
+ InlineMarkdown = React3.memo(({ text, color, italic }) => {
1622
1621
  if (!text) return null;
1623
1622
  const parts = text.split(/(```[\s\S]*?```|`[^`]+`|@\[.*?\]|\*\*.*?\*\*|\*.*?\*|\$.*?\$|\[.*?\]\s*\(.*?\)|\[.*?\]\s*\[.*?\]|https?:\/\/[^\s]+)/g);
1624
- return /* @__PURE__ */ React3.createElement(Text3, { color, wrap: "anywhere" }, parts.map((part, j) => {
1623
+ return /* @__PURE__ */ React3.createElement(Text3, { color, wrap: "anywhere", italic }, parts.map((part, j) => {
1625
1624
  if (!part) return null;
1626
1625
  if (part.startsWith("```") && part.endsWith("```")) {
1627
1626
  const content = part.slice(3, -3);
@@ -1682,7 +1681,7 @@ var init_ChatLayout = __esm({
1682
1681
  /* @__PURE__ */ React3.createElement(Box3, { flexDirection: "column", borderStyle: "round", borderColor: "#454545ff", paddingX: 1, marginY: 0, width: "100%", flexGrow: 1 }, /* @__PURE__ */ React3.createElement(Box3, { flexDirection: "row", borderStyle: "single", borderBottom: true, borderTop: false, borderLeft: false, borderRight: false, borderColor: "#444", marginBottom: 1, paddingBottom: 0, width: "100%" }, header.map((cell, i) => /* @__PURE__ */ React3.createElement(Box3, { key: i, flexBasis: `${colPercentage}%`, flexGrow: 1, flexShrink: 0, paddingRight: 2 }, /* @__PURE__ */ React3.createElement(InlineMarkdown, { text: wrapText(cell, colChars), color: "cyan" })))), data.map((row, ri) => /* @__PURE__ */ React3.createElement(Box3, { key: ri, flexDirection: "row", marginBottom: ri === data.length - 1 ? 0 : 1, width: "100%" }, row.map((cell, ci) => /* @__PURE__ */ React3.createElement(Box3, { key: ci, flexBasis: `${colPercentage}%`, flexGrow: 1, flexShrink: 0, paddingRight: 2, flexDirection: "column" }, /* @__PURE__ */ React3.createElement(InlineMarkdown, { text: wrapText(cell, colChars), color: "white" }))))))
1683
1682
  );
1684
1683
  });
1685
- MarkdownText = React3.memo(({ text, color = "white", columns = 80 }) => {
1684
+ MarkdownText = React3.memo(({ text, color = "white", columns = 80, italic = false }) => {
1686
1685
  if (!text) return null;
1687
1686
  const lines = text.split("\n");
1688
1687
  const result = [];
@@ -1695,7 +1694,7 @@ var init_ChatLayout = __esm({
1695
1694
  }
1696
1695
  if (quoteBuffer.length > 0) {
1697
1696
  result.push(
1698
- /* @__PURE__ */ React3.createElement(Box3, { key: `quote-${key}`, borderStyle: "bold", borderLeft: true, borderRight: false, borderTop: false, borderBottom: false, borderColor: "gray", paddingLeft: 1, marginY: 1, flexDirection: "column" }, quoteBuffer.map((line, qi) => /* @__PURE__ */ React3.createElement(InlineMarkdown, { key: qi, text: line, color: "gray" })))
1697
+ /* @__PURE__ */ React3.createElement(Box3, { key: `quote-${key}`, borderStyle: "bold", borderLeft: true, borderRight: false, borderTop: false, borderBottom: false, borderColor: "gray", paddingLeft: 1, marginY: 1, flexDirection: "column" }, quoteBuffer.map((line, qi) => /* @__PURE__ */ React3.createElement(InlineMarkdown, { key: qi, text: line, color: "gray", italic })))
1699
1698
  );
1700
1699
  quoteBuffer = [];
1701
1700
  }
@@ -1729,7 +1728,7 @@ var init_ChatLayout = __esm({
1729
1728
  );
1730
1729
  return;
1731
1730
  }
1732
- const isUnordered = trimmed.startsWith("* ") || trimmed.startsWith("- ");
1731
+ const isUnordered = /^[\*\-\+]\s/.test(trimmed);
1733
1732
  const isOrdered = /^\d+\.\s/.test(trimmed);
1734
1733
  const isAsciiArt = line.includes("\u2588") || line.includes("\u2554") || line.includes("\u255A") || line.includes("\u2550");
1735
1734
  let content = "";
@@ -1744,7 +1743,7 @@ var init_ChatLayout = __esm({
1744
1743
  content = wrapText(trimmed, columns - 4);
1745
1744
  }
1746
1745
  result.push(
1747
- /* @__PURE__ */ React3.createElement(Box3, { key: i, width: "100%" }, /* @__PURE__ */ React3.createElement(InlineMarkdown, { text: content, color }))
1746
+ /* @__PURE__ */ React3.createElement(Box3, { key: i, width: "100%" }, /* @__PURE__ */ React3.createElement(InlineMarkdown, { text: content, color, italic }))
1748
1747
  );
1749
1748
  }
1750
1749
  });
@@ -2194,7 +2193,7 @@ Internal tools. MUST use the EXACT syntax '[tool:functions.ToolName(args)]'. **N
2194
2193
 
2195
2194
  **TOOL USAGE POLICY:**
2196
2195
  - **MAX 3 TOOL CALLS PER TURN${mode === "Flux" ? " (EXCEPTION FOR Todo TOOL: 3+ CALLS ALLOWED)" : ""}. Next Turn, verify tool results, plan next**
2197
- ${mode === "Flux" ? "- USE multiple search & replace on patch tool if editing same file/path with many changes \u2190 **HIGHLY RECOMMENDED**\n- Tool execution denied? MUST use 'Ask' tool immediately for user reason/changes. NEVER END RESPONSE OR PROCEED BLINDLY \u2190 **MANDATORY**\n- FileMap >> ReadFile to understand file efficiently\n- Want spefific STRING across project/file? SearchKeyword >> Guessing/ReadFile\n- HUGE FILES? SearchKeyword >> FileMap/Full File read\n- MUST MARK DONE/APPEND Todos BASED ON REALTIME TASK PROGRESS ON EACH TURN outside 3 call limit" : ""}
2196
+ ${mode === "Flux" ? "- USE multiple search & replace on patch tool if editing same file/path with many changes \u2190 **HIGHLY RECOMMENDED**\n- Tool execution denied? MUST use 'Ask' tool immediately for user reason/changes. NEVER END RESPONSE OR PROCEED BLINDLY \u2190 **MANDATORY**\n- FileMap >> ReadFile to understand file efficiently\n- Want spefific STRING across project/file? SearchKeyword >> Guessing/ReadFile\n- HUGE FILES? SearchKeyword >> FileMap/Full File read\n- **MUST MARK DONE/APPEND Todos BASED ON REALTIME TASK PROGRESS ON *EACH TURN***" : ""}
2198
2197
  ${mode === "Flux" ? "- **File Tools >> Code in chat**\n\n" : ""}- COMMUNICATION TOOLS -
2199
2198
  1. [tool:functions.Ask(question="...", optionA="option::description", ...MAX 4)]. Ambiguity Resolution. Mandatory Triggers: Path Divergence, Security, Risk Mitigation. ask >> finish. Suggest best options; don't ask for preferences
2200
2199
 
@@ -2206,11 +2205,11 @@ ${mode === "Flux" ? `- WORKSPACE TOOLS (path = relative to CWD & WILL BE FIRST A
2206
2205
  1. [tool:functions.ReadFile(path="...", startLine=number, endLine=number)]. ${aiProvider !== "Google" ? `${isMultiModal ? `Supports images/docs. User gives image/doc: VIEW FIRST` : `No Multimodal support`}` : `Supports images/docs. User gives image/doc: VIEW FIRST`}
2207
2206
  2. [tool:functions.ReadFolder(path="...")]. Detailed DIR stats including File Sizes
2208
2207
  3. [tool:functions.FileMap(path="path/file")]. Shows file structure, dependency, functions, variable maps
2209
- 4. [tool:functions.PatchFile(path="...", replaceContent1="full line/block", newContent1="...", ...MAX 10)]. Surgical Patch. **Multiple patch on same file/path? Use replaceContent2, newContent2 etc >>> multiple spams**. Unsure? ReadFile >> guessing. **MUST VERIFY DIFF**
2208
+ 4. [tool:functions.PatchFile(path="...", replaceContent1="full line/block", newContent1="...", ...MAX 6)]. Surgical Patch. **Multiple patch on same file/path? Use replaceContent2, newContent2 etc >>> multiple spams**. Unsure? ReadFile >> guessing. **MUST VERIFY DIFF**
2210
2209
  5. [tool:functions.WriteFile(path="...", content="...")]. Creates/Overwrites. File Exist? PatchFile > WriteFile. Verify Imports
2211
2210
  6. [tool:functions.SearchKeyword(keyword="...", file="optional")]. 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
2212
2211
  7. [tool:functions.Run(command="...")]. Runs ${osDetected === "Windows" ? isPsAvailable() ? `${isPtyAvailable ? "Interactive " : ""}WINDOWS POWERSHELL ONLY` : `${isPtyAvailable ? "Interactive " : ""}WINDOWS CMD ONLY` : `${isPtyAvailable ? "Interactive " : ""}BASH`} command. Destructive/Irreversible ops -> Ask user. **TOOL DENY RULE APPLIES**. **1 CALL LIMIT FOR RUN**
2213
- 8. [tool:functions.Todo(method="create/append/get", tasks=[ARRAY OF STRINGS], markDone=[ARRAY OF TASK STRINGS])]. Task List, Markdown IN ARRAY NOT ALLOWED. USAGE: ANALYZE USER REQUEST \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`.trim() : `- CREATIVE TOOLS (path = relative to CWD & WILL BE FIRST ARGUMENT, path separator: '/') -
2212
+ 8. [tool:functions.Todo(method="create/append/get", tasks=[ARRAY OF STRINGS], markDone=[ARRAY OF TASK STRINGS])]. Task List, Markdown IN ARRAY NOT ALLOWED. 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`.trim() : `- CREATIVE TOOLS (path = relative to CWD & WILL BE FIRST ARGUMENT, path separator: '/') -
2214
2213
  1. [tool:functions.WritePDF(path="...", content="...", orientation="...")]. PROACTIVE A4 PAGE BREAKS MUST IN CSS. HTML/CSS for PREMIUM layout
2215
2214
  2. [tool:functions.WriteDoc(path="...", content="...")]. A4 Word document
2216
2215
  - WORKSPACE TOOLS ARE NOT AVAILABLE IN FLOW`.trim()}
@@ -3312,14 +3311,13 @@ ${isMemoryEnabled ? `-- User-specific long-term/permanent memory (USE BASED ON C
3312
3311
 
3313
3312
  Explicit Triggers for permanent memory:
3314
3313
  - User explicitly asks to 'remember' something.
3315
- - User mentions something important that should be remembered.
3316
- - User provides information that could be useful for future reference.
3314
+ - User mentions something important long-term that should be remembered.
3315
+ - User provides information that could be useful for long-term reference.
3317
3316
  - User shares personal information or preferences.
3318
- - User talks about a specific topic that should be remembered.
3319
3317
 
3320
3318
  Usage Rules:
3321
3319
  - Frequency for 'user' action: Based on explicit triggers.
3322
- - IF YOU WANT TO SAVE SOMETHING, BUT SIMILAR MEMORY ALREADY EXISTS, USE THE UPDATE METHOD NOT THE ADD METHOD` : ""}`.trim();
3320
+ - IF YOU WANT TO SAVE SOMETHING, BUT SIMILAR MEMORY ALREADY EXISTS, USE THE UPDATE METHOD NOT ADD` : ""}`.trim();
3323
3321
  }
3324
3322
  });
3325
3323
 
@@ -3328,7 +3326,7 @@ var thinking_prompts_default;
3328
3326
  var init_thinking_prompts = __esm({
3329
3327
  "src/data/thinking_prompts.json"() {
3330
3328
  thinking_prompts_default = {
3331
- xHigh: "EFFORT LEVEL: HIGH\nThink in a continuous, relentless analytical monologue within <think>...</think>. Engage in adversarial self interrogation that treats every assumption as hostile until proven:\nDeconstruct requirements into atomic invariants. Trace every implicit dependency, side effect, and state mutation. Map the entire dependency graph and identify circular dependencies or tight coupling before they manifest\nEvaluate algorithmic complexity (time/space) for every operation. Consider memory models, cache locality, and allocation patterns. For concurrent systems, reason through race conditions, deadlocks, and memory ordering\nFormulate solutions by comparing multiple architectural approaches. Explicitly evaluate trade offs, monolithic vs modular, eager vs lazy, mutable vs immutable, sync vs async. Choose based on measured criteria, not intuition\nMentally execute the solution at multiple scales. What breaks at 10x load? 100x? What happens under resource exhaustion? Trace error propagation paths through every layer\nActively attempt to falsify your own logic. Steel man the opposite approach. Search for, off by one errors, integer overflow, null/undefined propagation, unhandled promises, resource leaks, SQL injection vectors, XSS vulnerabilities, CSRF holes, timing attacks, and privilege escalation paths\nReason about observability, what metrics matter? Where are the logging gaps? How will this be debugged in production at 3am?\nConsider future evolution, what changes will this architecture resist vs accommodate? Where are the extension points? What will break when requirements inevitably change?\nMap out implementation with surgical precision, exact file structure, module boundaries, interface contracts, error types, and test strategies before writing a single line\nRULES:\n- NO HEADINGS/MARKERS/LISTS\n- Dense, unbroken stream of consciousness that reads like an internal monologue\n- Ruthlessly question every architectural choice. Default to skepticism\n- Think in terms of invariants, contracts, and failure modes, not just happy paths\n- Verify ALL imports and system stability, AVOID ANY Syntax errors, re-read TOOL RESULTS/files to verify\n- MANDATORY THINKING: Full reasoning required for ALL requests/greetings (verify context, check for hidden complexity)",
3329
+ xHigh: "EFFORT LEVEL: HIGH\nThink in a continuous, relentless analytical monologue. Engage in adversarial self interrogation that treats every assumption as hostile until proven:\nDeconstruct requirements into atomic invariants. Trace every implicit dependency, side effect, and state mutation. Map the entire dependency graph and identify circular dependencies or tight coupling before they manifest\nEvaluate algorithmic complexity (time/space) for every operation. Consider memory models, cache locality, and allocation patterns. For concurrent systems, reason through race conditions, deadlocks, and memory ordering\nFormulate solutions by comparing multiple architectural approaches. Explicitly evaluate trade offs, monolithic vs modular, eager vs lazy, mutable vs immutable, sync vs async. Choose based on measured criteria, not intuition\nMentally execute the solution at multiple scales. What breaks at 10x load? 100x? What happens under resource exhaustion? Trace error propagation paths through every layer\nActively attempt to falsify your own logic. Steel man the opposite approach. Search for, off by one errors, integer overflow, null/undefined propagation, unhandled promises, resource leaks, SQL injection vectors, XSS vulnerabilities, CSRF holes, timing attacks, and privilege escalation paths\nReason about observability, what metrics matter? Where are the logging gaps? How will this be debugged in production at 3am?\nConsider future evolution, what changes will this architecture resist vs accommodate? Where are the extension points? What will break when requirements inevitably change?\nMap out implementation with surgical precision, exact file structure, module boundaries, interface contracts, error types, and test strategies before writing a single line\nRULES:\n- Ruthlessly question every architectural choice. Default to skepticism\n- Think in terms of invariants, contracts, and failure modes, not just happy paths\n- Verify ALL imports and system stability, AVOID ANY Syntax errors, re-read TOOL RESULTS/files to verify\n- MANDATORY THINKING: Full reasoning required for ALL requests/greetings (verify context, check for hidden complexity)",
3332
3330
  High: "EFFORT LEVEL: HIGH\nThink in a rigorous, technically grounded monologue within <think>...</think>. Treat this as a design review where every decision must be justified:\nBreak the objective into verifiable steps with clear success criteria. Identify the critical path and potential bottlenecks\nMentally compile and execute your approach. Check for: missing imports, undefined behavior, type mismatches, unhandled errors, and resource cleanup. Trace data flow from input to output, noting transformations\nRecognize design patterns and anti patterns. If you see God objects, tight coupling, or premature optimization, call it out and refactor mentally before committing\nEvaluate performance characteristics. Will this scale? Are there O(n\xB2) operations hiding in innocent looking code? Where are the allocation hotspots?\nConsider the error surface, what can fail and how? Design error handling that preserves invariants and provides actionable feedback\nReview your architecture for, separation of concerns, single responsibility, dependency inversion, and interface segregation. Ensure clean abstractions with minimal coupling\nRULES:\n- NO HEADINGS/MARKERS/LISTS\n- Continuous analytical flow\n- Verify correctness through first principles reasoning, not pattern matching\n- Actively search for ways your solution could fail or degrade\n- Verify ALL imports and system stability, AVOID ANY Syntax errors, re-read TOOL RESULTS/files to verify\n- MANDATORY THINKING: Full technical verification for all tasks/greetings",
3333
3331
  Medium: "EFFORT LEVEL: MEDIUM\nThink in a focused, technically-aware monologue within <think>...</think>\nIdentify the most direct path that satisfies requirements without over-engineering\nQuickly scan for obvious issues, missing error handling, incorrect input assumptions, forgotten edge cases, or missing dependencies\nVerify the solution is appropriately modular with cohesive changes\nOutline the concrete changes, which files, which functions, what the key logic looks like\nRULES:\n- NO HEADINGS/MARKERS/LISTS\n- Clean logical stream\n- Efficient but deliberate. Focus energy on actionable implementation details\n- Verify ALL imports and system stability, AVOID ANY Syntax errors, re-read TOOL RESULTS/files to verify\n- MANDATORY THINKING: Brief verification for technical tasks/greetings",
3334
3332
  Minimal: "EFFORT LEVEL: LOW\nThink in a quick, focused monologue within <think>...</think>. Just verify the basics:\nConfirm what the user wants and whether it's straightforward or has hidden complexity\nIdentify the specific tool, file, or action needed\nCheck for any obvious correctness issues before acting\nRULES:\n- NO HEADINGS/MARKERS/LISTS\n- Few lines of clear thought\n- Just enough thinking to avoid obvious mistakes\n- Verify ALL imports and system stability, AVOID ANY Syntax errors, re-read TOOL RESULTS/files to verify\n- Suitable for simple requests/greetings",
@@ -3415,11 +3413,9 @@ Mode: ${mode}${thinkingLevel !== "Fast" ? " (Thinking)" : ""}. ${mode === "Flux"
3415
3413
  ${aiProvider === "Google" ? `${thinkingLevel !== "GEM" ? `
3416
3414
  -- THINKING RULES --
3417
3415
  ${thinkingConfig}
3418
- ${thinkingLevel !== "Fast" ? `
3416
+ ${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" ? `
3419
3417
  CRITICAL THINKING POLICY
3420
- - ALWAYS use <think> ... </think> before responding, even with simple queries/greetings
3421
- - ${thinkingLevel === "Low" || thinkingLevel === "Medium" || thinkingLevel === "Fast" ? "C" : "Interrogate approaches adversarially, but c"}ommit once best solution is determined through analysis. Avoid spiraling after reaching decision point
3422
- - Thinking should scale with task complexity` : ""}` : ""}` : ``}
3418
+ - ALWAYS use <think> ... </think> before responding, even with simple queries/greetings` : ""}` : ""}` : ``}
3423
3419
  ${TOOL_PROTOCOL(mode, osDetected, aiProvider.toLowerCase() === "deepseek" ? false : isMultiModal, aiProvider)}
3424
3420
  ${projectContextBlock}
3425
3421
  -- MEMORY RULES --
@@ -6067,7 +6063,7 @@ var init_todo = __esm({
6067
6063
  const content = getTasksString(tasks);
6068
6064
  await RevertManager.recordFileChange(todoFile);
6069
6065
  fs19.writeFileSync(todoFile, content, "utf8");
6070
- const total = (content.match(/^- \[ [xX ]\]/gm) || []).length;
6066
+ const total = content.split(/\r?\n/).map((l) => l.trim()).filter((l) => l.startsWith("- [ ]") || l.startsWith("- [x]") || l.startsWith("- [X]")).length;
6071
6067
  return `SUCCESS: TASK LIST CREATED (${total} total)
6072
6068
  ${content}`;
6073
6069
  }
@@ -6077,9 +6073,10 @@ ${content}`;
6077
6073
  await RevertManager.recordFileChange(todoFile);
6078
6074
  fs19.appendFileSync(todoFile, appendContent, "utf8");
6079
6075
  const fullContent = fs19.readFileSync(todoFile, "utf8");
6080
- const total = (fullContent.match(/^- \[ [xX ]\]/gm) || []).length;
6081
- const completed = (fullContent.match(/^- \[x\]/gim) || []).length;
6082
- const added = (appendContent.match(/^- \[ [xX ]\]/gm) || []).length;
6076
+ const lines = fullContent.split(/\r?\n/).map((l) => l.trim());
6077
+ const total = lines.filter((l) => l.startsWith("- [ ]") || l.startsWith("- [x]") || l.startsWith("- [X]")).length;
6078
+ const completed = lines.filter((l) => l.startsWith("- [x]") || l.startsWith("- [X]")).length;
6079
+ const added = appendContent.split(/\r?\n/).map((l) => l.trim()).filter((l) => l.startsWith("- [ ]") || l.startsWith("- [x]") || l.startsWith("- [X]")).length;
6083
6080
  return `SUCCESS: TASK APPENDED (${completed} completed, ${total - completed} left, ${added} added)
6084
6081
  ${fullContent}`;
6085
6082
  }
@@ -6123,8 +6120,9 @@ ${fullContent}`;
6123
6120
  fs19.writeFileSync(todoFile, content, "utf8");
6124
6121
  }
6125
6122
  }
6126
- const total = (content.match(/^- \[ [xX ]\]/gm) || []).length;
6127
- const completed = (content.match(/^- \[x\]/gim) || []).length;
6123
+ const totalLines = content.split(/\r?\n/).map((l) => l.trim());
6124
+ const total = totalLines.filter((l) => l.startsWith("- [ ]") || l.startsWith("- [x]") || l.startsWith("- [X]")).length;
6125
+ const completed = totalLines.filter((l) => l.startsWith("- [x]") || l.startsWith("- [X]")).length;
6128
6126
  const prefix = markedCount > 0 ? `SUCCESS: ${markedCount} TASK(S) MARKED DONE` : `TODO GET`;
6129
6127
  return `${prefix}: ${completed} Completed, ${total - completed} left
6130
6128
  ${content}`;
@@ -8014,7 +8012,7 @@ ${ideCtx.warnings}
8014
8012
  CWD: ${process.cwd()}${cwdMismatch ? ` (WARNING: CWD Mismatch! Previous Path: ${lastCwd})` : ""}
8015
8013
  **DIRECTORY STRUCTURE**
8016
8014
  ${dirStructure}${memoryPrompt}${ideBlock}
8017
- ${activeSummaryBlock}${thinkingLevel != "Fast" && aiProvider === "Google" ? `${modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITICAL PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think>**\n[/SYSTEM]" : ""}` : ""} [USER] ${cleanAgentText}[/USER]`.trim();
8015
+ ${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" && aiProvider === "Google" ? `${modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITICAL PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think>**\n[/SYSTEM]\n" : ""}` : ""}[USER] ${cleanAgentText.trim()} [/USER]`.trim();
8018
8016
  modifiedHistory.push({ role: "user", text: firstUserMsg });
8019
8017
  if (activeSummaryBlock && history[history.length - 1]?.id) {
8020
8018
  yield { type: "summary_injected", content: { id: history[history.length - 1].id, text: firstUserMsg } };
@@ -8052,7 +8050,7 @@ ${activeSummaryBlock}${thinkingLevel != "Fast" && aiProvider === "Google" ? `${m
8052
8050
 
8053
8051
  [STEERING HINT]: ${hint}`;
8054
8052
  } else {
8055
- modifiedHistory.push({ role: "user", text: `${thinkingLevel != "Fast" && aiProvider === "Google" ? `${modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITICAL PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think>**\n[/SYSTEM]" : ""}` : ""} [STEERING HINT]: ${hint}` });
8053
+ modifiedHistory.push({ role: "user", text: `${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" && aiProvider === "Google" ? `${modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITICAL PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think>**\n[/SYSTEM]\n" : ""}` : ""}[STEERING HINT]: ${hint}` });
8056
8054
  }
8057
8055
  yield { type: "status", content: "Steering Hint Injected." };
8058
8056
  }
@@ -8178,11 +8176,20 @@ ${activeSummaryBlock}${thinkingLevel != "Fast" && aiProvider === "Google" ? `${m
8178
8176
  yield { type: "model_update", content: null };
8179
8177
  }
8180
8178
  currentSystemInstruction = getSystemInstruction(profile, !(targetModel || "gemma").toLowerCase().startsWith("gemma") ? "GEM" : thinkingLevel, mode, systemSettings, isMemoryEnabled, isFirstPrompt, aiProvider, isMultiModal);
8181
- const isGemma = modelName && modelName.toLowerCase().startsWith("gemma") && aiProvider === "Google";
8182
8179
  const lastUserMsg = contents[contents.length - 1];
8180
+ if (isBridgeConnected()) {
8181
+ await new Promise((resolve) => setTimeout(resolve, 2e3));
8182
+ const ideCtxJIT = await getIDEContext();
8183
+ const ideErr = ideCtxJIT ? ideCtxJIT.diagnostics : null;
8184
+ if (ideErr && lastUserMsg && lastUserMsg.role === "user" && lastUserMsg.parts?.[0]?.text) {
8185
+ lastUserMsg.parts[0].text += `
8186
+ [COMPILE ERROR] ${ideErr} [/ERROR]`;
8187
+ }
8188
+ }
8189
+ const isGemma = modelName && modelName.toLowerCase().startsWith("gemma") && aiProvider === "Google";
8183
8190
  if (isGemma) {
8184
8191
  const jitInstruction = `
8185
- [SYSTEM] Tool result received. Analyze output and proceed with your turn${thinkingLevel != "Fast" && aiProvider === "Google" ? `. **STRICTLY MAINTAIN THINKING POLICY. DO NOT START A RESPONSE WITHOUT <think> ... </think>**` : ""}[/SYSTEM]`;
8192
+ [SYSTEM] Tool result received. Analyze output and proceed with your turn${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" && aiProvider === "Google" ? `. **STRICTLY MAINTAIN THINKING POLICY. DO NOT START A RESPONSE WITHOUT <think> ... </think>**` : ""}[/SYSTEM]`;
8186
8193
  if (lastUserMsg && lastUserMsg.role === "user" && lastUserMsg.parts?.[0]?.text?.startsWith("[TOOL RESULT]")) {
8187
8194
  lastUserMsg.parts[0].text += jitInstruction;
8188
8195
  }
@@ -8256,7 +8263,8 @@ ${activeSummaryBlock}${thinkingLevel != "Fast" && aiProvider === "Google" ? `${m
8256
8263
  const isGemini3 = modelLower.includes("gemini-3");
8257
8264
  if (isGemma4 || isGemini3) {
8258
8265
  if (isGemma4) {
8259
- return { includeThoughts: false, thinkingLevel: ThinkingLevel.MINIMAL };
8266
+ if (thinkingLevel.toLowerCase() !== "xhigh" || false) return { includeThoughts: false, thinkingLevel: ThinkingLevel.MINIMAL };
8267
+ else return { includeThoughts: true, thinkingLevel: ThinkingLevel.HIGH };
8260
8268
  }
8261
8269
  return {
8262
8270
  includeThoughts: true,
@@ -8729,6 +8737,7 @@ ${activeSummaryBlock}${thinkingLevel != "Fast" && aiProvider === "Google" ? `${m
8729
8737
  } else {
8730
8738
  label = `Executed: ${toolCall.toolName}`;
8731
8739
  }
8740
+ yield* flushGoogleBuffer2();
8732
8741
  if (normToolName === "exec_command") {
8733
8742
  const { command } = parseArgs(toolCall.args);
8734
8743
  if (command && settings.systemSettings && settings.systemSettings.allowExternalAccess === false) {
@@ -9159,7 +9168,7 @@ ${boxBottom}` };
9159
9168
  }
9160
9169
  let result = await dispatchTool(normToolName, toolCall.args, execToolContext);
9161
9170
  yield { type: "spinner", content: true };
9162
- if (normToolName === "write_file" && result.startsWith("SUCCESS")) {
9171
+ if ((normToolName === "write_file" || normToolName === "update_file") && result.startsWith("SUCCESS")) {
9163
9172
  const { path: filePath } = parseArgs(toolCall.args);
9164
9173
  if (filePath) {
9165
9174
  const absPath = path19.resolve(process.cwd(), filePath);
@@ -9424,7 +9433,7 @@ ${boxBottom}` };
9424
9433
  const waitTime = Math.min(1e3 * Math.pow(2, inStreamRetryCount - 1), 24e3);
9425
9434
  if (turnText.trim().length > 0) {
9426
9435
  modifiedHistory.push({ role: "agent", text: turnText });
9427
- const recoveryText = "[SYSTEM]\n- SEAMLESS CONTINUATION: Resume immediately. Pick up from last words with zero gap/disruption\n- NO REPETITION: Do not repeat any text already written\n- NO RE-THINK: Do not restart or open <think> if reasoning already started. Continue the thinking and close thinking block with </think> if opened before outputting user response\n- MID-TOOL SAFETY: If cutoff was mid-tool call, restart that tool call from start\n- STEALTH: Do not mention/apologize for cutoff[/SYSTEM]";
9436
+ const recoveryText = "[SYSTEM]\n- SEAMLESS CONTINUATION: Resume immediately. Pick up from last words with zero gap/disruption\n- NO REPETITION: Do not repeat any text already written\n- NO RE-THINK: Do not restart or open <think> if reasoning already started. Continue the thinking and close thinking block </think> if opened before outputting user response\n- MID-TOOL SAFETY: If cutoff was mid-tool call, restart that tool call from start\n- STEALTH: Do not mention/apologize for cutoff[/SYSTEM]";
9428
9437
  if (toolResults.length > 0) {
9429
9438
  toolResults.forEach((tr, idx) => {
9430
9439
  if (idx === toolResults.length - 1) {
package/package.json CHANGED
@@ -1,64 +1,64 @@
1
- {
2
- "name": "fluxflow-cli",
3
- "version": "2.8.4",
4
- "date": "2026-06-18",
5
- "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
6
- "keywords": [
7
- "ai",
8
- "agent",
9
- "terminal",
10
- "cli",
11
- "gemini",
12
- "ink",
13
- "flux"
14
- ],
15
- "license": "MIT",
16
- "repository": {
17
- "type": "git",
18
- "url": "git+https://github.com/KushalRoyChowdhury/fluxflow-cli.git"
19
- },
20
- "engines": {
21
- "node": ">=20",
22
- "vscode": "^1.90.0"
23
- },
24
- "files": [
25
- "dist",
26
- "README.md",
27
- "package.json",
28
- "ARCHITECTURE.md",
29
- "TOOLS.md",
30
- "UI_FEATURES.md"
31
- ],
32
- "type": "module",
33
- "bin": {
34
- "fluxflow-cli": "dist/fluxflow.js",
35
- "fluxflow": "dist/fluxflow.js"
36
- },
37
- "scripts": {
38
- "start": "tsx ./src/cli.jsx",
39
- "build": "esbuild ./src/cli.jsx --bundle --platform=node --format=esm --outfile=./dist/fluxflow.js --external:react --external:ink --external:chalk --external:fs-extra --external:gradient-string --external:ink-text-input --external:ink-select-input --external:@google/genai --external:zod --external:nanoid --external:puppeteer --external:pdf-lib --external:node-pty --external:html-to-docx --external:typescript --external:ws --external:web-tree-sitter"
40
- },
41
- "dependencies": {
42
- "@google/genai": "^1.52.0",
43
- "chalk": "^5.6.2",
44
- "fs-extra": "^11.3.4",
45
- "gradient-string": "^3.0.0",
46
- "html-to-docx": "^1.8.0",
47
- "ink": "^7.0.1",
48
- "ink-select-input": "^6.2.0",
49
- "ink-text-input": "^6.0.0",
50
- "nanoid": "^5.1.9",
51
- "node-pty": "^1.1.0",
52
- "pdf-lib": "^1.17.1",
53
- "puppeteer": "24.43.1",
54
- "react": "^19.2.5",
55
- "web-tree-sitter": "^0.25.10",
56
- "ws": "^8.21.0",
57
- "zod": "^4.3.6"
58
- },
59
- "devDependencies": {
60
- "@types/react": "^19.2.14",
61
- "esbuild": "^0.28.0",
62
- "tsx": "^4.21.0"
63
- }
64
- }
1
+ {
2
+ "name": "fluxflow-cli",
3
+ "version": "2.8.6",
4
+ "date": "2026-06-18",
5
+ "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
6
+ "keywords": [
7
+ "ai",
8
+ "agent",
9
+ "terminal",
10
+ "cli",
11
+ "gemini",
12
+ "ink",
13
+ "flux"
14
+ ],
15
+ "license": "MIT",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/KushalRoyChowdhury/fluxflow-cli.git"
19
+ },
20
+ "engines": {
21
+ "node": ">=20",
22
+ "vscode": "^1.90.0"
23
+ },
24
+ "files": [
25
+ "dist",
26
+ "README.md",
27
+ "package.json",
28
+ "ARCHITECTURE.md",
29
+ "TOOLS.md",
30
+ "UI_FEATURES.md"
31
+ ],
32
+ "type": "module",
33
+ "bin": {
34
+ "fluxflow-cli": "dist/fluxflow.js",
35
+ "fluxflow": "dist/fluxflow.js"
36
+ },
37
+ "scripts": {
38
+ "start": "tsx ./src/cli.jsx",
39
+ "build": "esbuild ./src/cli.jsx --bundle --platform=node --format=esm --outfile=./dist/fluxflow.js --external:react --external:ink --external:chalk --external:fs-extra --external:gradient-string --external:ink-text-input --external:ink-select-input --external:@google/genai --external:zod --external:nanoid --external:puppeteer --external:pdf-lib --external:node-pty --external:html-to-docx --external:typescript --external:ws --external:web-tree-sitter"
40
+ },
41
+ "dependencies": {
42
+ "@google/genai": "^1.52.0",
43
+ "chalk": "^5.6.2",
44
+ "fs-extra": "^11.3.4",
45
+ "gradient-string": "^3.0.0",
46
+ "html-to-docx": "^1.8.0",
47
+ "ink": "^7.0.1",
48
+ "ink-select-input": "^6.2.0",
49
+ "ink-text-input": "^6.0.0",
50
+ "nanoid": "^5.1.9",
51
+ "node-pty": "^1.1.0",
52
+ "pdf-lib": "^1.17.1",
53
+ "puppeteer": "24.43.1",
54
+ "react": "^19.2.5",
55
+ "web-tree-sitter": "^0.25.10",
56
+ "ws": "^8.21.0",
57
+ "zod": "^4.3.6"
58
+ },
59
+ "devDependencies": {
60
+ "@types/react": "^19.2.14",
61
+ "esbuild": "^0.28.0",
62
+ "tsx": "^4.21.0"
63
+ }
64
+ }