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: docs/advanced-usage/prompt-structure.md
+19-2Lines changed: 19 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,10 @@ Roo Code uses three primary message types when communicating with LLMs:
10
10
-**User Messages**: Content sent by you (the user) to Roo
11
11
-**Assistant Messages**: Responses generated by the LLM based on your requests
12
12
13
+
At the API level, there's also a fourth message role:
14
+
15
+
-**Tool Messages**: Results returned from tool executions, sent back to the LLM as input
16
+
13
17
Understanding these message types helps you work more effectively with Roo and can be valuable for troubleshooting or advanced customization.
14
18
15
19
## System Prompt
@@ -42,7 +46,8 @@ User messages contain your direct inputs to Roo, plus additional contextual info
42
46
- Cursor position
43
47
- Active terminals with output
44
48
- Recently modified files
45
-
- Current time and token/cost information
49
+
- Current time
50
+
- Token/cost information
46
51
- Current mode
47
52
- File listing (on initial connection)
48
53
@@ -55,7 +60,8 @@ Assistant messages are the LLM's responses, which may include:
55
60
-**Text Responses**: Direct answers to your queries
56
61
-**Thinking**: Internal reasoning process (visible when enabled)
57
62
-**Tool Calls**: Requests to use specific tools like reading files or executing commands
58
-
-**Tool Results**: The outcome of executed tools
63
+
64
+
Note that while assistant messages contain tool calls, the results of those tools are sent back to the LLM in separate tool messages, not as part of the assistant message itself.
59
65
60
66
## Message Flow
61
67
@@ -77,6 +83,17 @@ Internally, Roo's prompt construction is handled by several components:
77
83
-**Message Transformation**: Provider-specific transformers convert Roo's internal message format to the format required by each LLM API
78
84
-**Custom Prompt Loading**: The `loadSystemPromptFile` function checks for and processes custom system prompt files
79
85
86
+
## Support Prompts
87
+
88
+
Alongside the main chat flow, Roo uses specialized templates for specific code actions:
89
+
90
+
-**Code Action Prompts**: For commands like "Explain", "Fix", "Improve", or "Add to Context"
91
+
-**Template-Based**: Generated from templates in `src/shared/support-prompt.ts`
92
+
-**Independent Context**: Often operates without the main chat history
93
+
-**Task-Specific Format**: Optimized for the specific code task being performed
94
+
95
+
These support prompts work outside the normal conversation flow to provide focused assistance for specific coding tasks.
Copy file name to clipboardExpand all lines: docs/features/experimental/experimental-features.md
-8Lines changed: 0 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,14 +18,6 @@ To enable or disable experimental features:
18
18
19
19
The following experimental features are currently available:
20
20
21
-
### Search and Replace
22
-
23
-
Adds a new tool for searching and replacing text in a file.
24
-
25
-
### Insert Content
26
-
27
-
Adds a new tool for inserting content at any position in a file.
28
-
29
21
### Power Steering
30
22
31
23
When enabled, Roo will remind the model about the details of its current mode definition more frequently. This will lead to stronger adherence to role definitions and custom instructions, but will use more tokens per message.
0 commit comments