You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: FUNCTIONAL_MANUAL.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -183,14 +183,16 @@ Beyond searching your entire workspace, you can explicitly "pin" documents to a
183
183
184
184
Agent Mode transforms the chat assistant from a passive information retriever into an active workspace participant.
185
185
186
-
-**Tool Calling**: When Agent Mode is enabled, the AI can proactively use tools to interact with your workspace. This includes:
186
+
-**Tool Calling**: When Agent Mode is enabled, the AI can proactively use tools to interact with your workspace. You can **enable or disable specific tools** in the **AI Chat** settings to control exactly what the agent can do. Available capabilities include:
187
187
-**Document Management**: Creating new documents or folders, renaming existing ones, and moving files between directories.
188
188
-**Content Refactoring**: Reading document contents and performing bulk edits or restructurings based on your instructions.
189
189
-**Script Execution**: Running Python, Shell, or PowerShell scripts to process data, generate files, or automate complex workflows.
190
190
-**Action Approval Gate**: For security, all sensitive actions (like deleting documents or running scripts) can be configured to require your manual approval. A glassmorphic modal will appear showing exactly what the AI intends to do, including any script code or move parameters, allowing you to approve or deny the request before it executes.
191
+
-**Real-Time Execution Logs**: To provide transparency, DocForge streams detailed logs of the RAG search and tool execution process directly into the chat. You can see when the AI is searching the index, which files it found, and the exact status of tool calls as they happen.
191
192
-**Thoughtful Execution**: The agent can perform multi-step tasks—for example, it can list all documents in a folder, search for specific patterns, and then create a summary document based on its findings—all in a single conversation turn.
192
193
-**Deep Integration**: The agent has direct access to the same document hooks as the GUI, ensuring that its actions are consistent with the application's state and history.
193
194
195
+
194
196
#### Python Execution Panel
195
197
196
198
DocForge includes an embedded Python runner that integrates with the editor when you're working on Python content.
Copy file name to clipboardExpand all lines: TECHNICAL_MANUAL.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,12 +115,16 @@ DocForge treats shell and PowerShell automation as first-class workflows that sp
115
115
-**Main-process runner (`electron/scriptRunner.ts`):** Persists run metadata, writes temporary script files, and spawns the resolved executable. Test mode leverages `scriptArgs.ts` to compute syntax-only flags (for example, Bash `-n`, or a PowerShell `ScriptBlock` parser) and gracefully fails when an interpreter cannot support syntax checks. Streams from stdout/stderr are recorded to `script_execution_logs` and broadcast back to the renderer.
116
116
-**Defaults management:** Global defaults live in the `settings` table (`shellDefaults`, `powershellDefaults`) and are edited through `SettingsView.tsx`. When a run starts, the runner merges these defaults with per-document overrides so teams can set organization-wide variables while allowing individual scripts to customize their environment safely.
117
117
118
-
### LLM Service (`services/llmService.ts`)
118
+
### LLM Service (`services/llmService.ts`) & RAG Orchestrator
119
+
120
+
This module handles all communication with the external Large Language Model and coordinates the "Chat with Workspace" workflow.
121
+
122
+
-**API Integration**: It constructs the appropriate API request body based on the configured API type (Ollama or OpenAI-compatible). It includes robust error handling to manage connection failures or non-OK responses from the provider.
123
+
-**Agentic Tool Filtering**: When Agent Mode is active, the service filters the available tools based on the `chatEnabledTools` user setting before sending them to the LLM. This ensures the AI only attempts actions that the user has explicitly permitted.
124
+
-**Log Propagation (`onLog`)**: The `ragService` includes a callback mechanism that streams diagnostic logs (e.g., search distance, tool execution status, history trimming) back to the UI. This provides users with visibility into the "thinking" and "acting" phases of the assistant.
125
+
-**Context Management**: To maintain efficiency and accuracy, the service automatically trims conversation history to the last 10 turns and includes pinned documents directly in the system prompt context.
126
+
-**Clipboard Intelligence**: Clipboard imports invoke `llmService.generateTitle()` when a provider is online, allowing the renderer to assign meaningful titles to new documents automatically.
119
127
120
-
This module handles all communication with the external Large Language Model. It is largely unchanged by the database migration.
121
-
- It constructs the appropriate API request body based on the configured API type (Ollama or OpenAI-compatible).
122
-
- It includes robust error handling to manage connection failures or non-OK responses from the provider.
123
-
- Clipboard imports invoke `llmService.generateTitle()` when a provider is online, allowing the renderer to assign meaningful titles to new documents automatically.
0 commit comments