forked from mnbvc188199/Warrior_EA
Wrap the `TCWarnIfSlow` calls in `CExpertCustom::OnTick` and the `TCWarnIfMemoryAbove` call in `CExpertCustom::OnTimer` with `VerboseMode` guards. This silences routine diagnostic noise during normal operation while still allowing detailed performance tracing when `VerboseMode` is enabled.
57 lines
2.1 KiB
Markdown
57 lines
2.1 KiB
Markdown
# Cline Tooling Syntax Tutorial & Strict Enforcement
| |
| |
You must strictly follow the syntax rules below for every tool call. Failures to comply will crash the system with unparsable response errors.
| |
| |
## 1. Core Tooling Rules
| |
* **Format**: Execute exactly ONE tool call per response.
| |
* **Separation**: Never mix conversational text inside the XML/JSON tool block. Text goes BEFORE or AFTER, never inside.
| |
* **No Placeholders**: Never use `// ... rest of code` or `...`. You must provide exact lines or full context as required by the schema.
| |
| |
## 2. Syntax Reference Tutorial
| |
| |
### Read File (`read_file`)
| |
Use this to inspect file contents. Always specify exact path and range if needed.
| |
```xml
| |
<read_file>
| |
<path>Expert/ExpertCustom.mqh</path>
| |
</read_file>
| |
```
| |
| |
### Write File (`write_file`)
| |
Use this ONLY to create new files or overwrite small files entirely. Never leave code truncated.
| |
```xml
| |
<write_file>
| |
<path>Variables/Inputs.mqh</path>
| |
<content>// Full file content here
| |
void OnTick() {
| |
// Exact code
| |
}</content>
| |
</write_file>
| |
```
| |
| |
### Search & Replace (`replace_in_file`)
| |
This is the most sensitive tool. The `search` block must match the target file exactly, character for character, including spaces and indentation.
| |
```xml
| |
<replace_in_file>
| |
<path>Expert/ExpertCustom.mqh</path>
| |
<search>void OldFunction() {
| |
Print("Old");
| |
}</search>
| |
<replace>void NewFunction() {
| |
Print("New");
| |
}</replace>
| |
</replace_in_file>
| |
```
| |
| |
### Execute Command (`execute_command`)
| |
Run one single command. Do not chain multiple commands with `&&` if they can fail independently.
| |
```xml
| |
<execute_command>
| |
<command>grep -rn "VerboseMode" Warrior_EA/</command>
| |
</execute_command>
| |
```
| |
| |
## 3. Invalid Formatting Guardrails (Anti-Crash)
| |
* **CRITICAL**: Do not wrap tool blocks inside standard markdown code blocks (e.g., do NOT do \`\`\`xml <tool> \`\`\`). Output the XML tags directly.
| |
* **Tag Closure**: Always double-check that every opening tag (e.g., `<path>`) has its exact closing tag (e.g., `</path>`).
| |
* **Empty Responses**: If you have no action to perform, state it in plain text. Do not output empty XML tags.
|