Skip to content

Commit f8b2a6e

Browse files
committed
docs
1 parent abc4861 commit f8b2a6e

File tree

3 files changed

+37
-4
lines changed

3 files changed

+37
-4
lines changed

docs/configuration.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,22 @@ There are 3 possible ways to configure rules following this order of priority:
320320
"rules": [{"path": "my-rule.md"}]
321321
}
322322
```
323+
324+
## Behaviors / prompts
325+
326+
ECA allows to totally customize the prompt sent to LLM via the `behavior` config, allowing to have multiple behaviors for different tasks or workflows.
327+
328+
=== "Example: my-behavior"
329+
330+
```javascript
331+
{
332+
"behavior": {
333+
"my-behavior": {
334+
"systemPromptFile": "/path/to/my-behavior-prompt.md"
335+
}
336+
}
337+
}
338+
```
323339

324340
## All configs
325341

@@ -426,6 +442,21 @@ There are 3 possible ways to configure rules following this order of priority:
426442
"mcpTimeoutSeconds" : 60,
427443
"lspTimeoutSeconds" : 30,
428444
"mcpServers" : {},
445+
"behavior" {
446+
"agent": {"systemPromptFile": "prompts/agent_behavior.md",
447+
"disabledTools": ["eca_preview_file_change"]},
448+
"plan": {"systemPromptFile": "prompts/plan_behavior.md",
449+
"disabledTools": ["eca_edit_file", "eca_write_file", "eca_move_file"],
450+
"toolCall": {"approval": {"deny": {"eca_shell_command":
451+
{"argsMatchers": {"command" [".*>.*",
452+
".*\\|\\s*(tee|dd|xargs).*",
453+
".*\\b(sed|awk|perl)\\s+.*-i.*",
454+
".*\\b(rm|mv|cp|touch|mkdir)\\b.*",
455+
".*git\\s+(add|commit|push).*",
456+
".*npm\\s+install.*",
457+
".*-c\\s+[\"'].*open.*[\"']w[\"'].*",
458+
".*bash.*-c.*>.*"]}}}}}}
459+
}
429460
"defaultBehavior": "agent"
430461
"welcomeMessage" : "Welcome to ECA!\n\nType '/' for commands\n\n"
431462
"index" : {

docs/features.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ Chat is the main feature of ECA, allowing user to talk with LLM to behave like a
88

99
![](./images/features/chat-behaviors.png)
1010

11-
Behavior affect the prompt passed to LLM and the tools to include, the current supported behaviors are:
11+
Behavior affect the prompt passed to LLM and the tools to include, ECA allow to override or customize your owns behaviors, the built-in provider behaviors are:
1212

13-
- `plan`: Useful to plan changes and define better LLM plan before changing code via agent mode.
14-
- `agent`: Make changes to code via file changing tools.
13+
- `plan`: Useful to plan changes and define better LLM plan before changing code via agent mode. [Prompt here](https://github.com/editor-code-assistant/eca/blob/master/resources/prompts/plan_behavior.md)
14+
- `agent`: Make changes to code via file changing tools. (Default) [Prompt here](https://github.com/editor-code-assistant/eca/blob/master/resources/prompts/agent_behavior.md)
15+
16+
To create and customize your own behaviors, check [config](./configuration.md#).
1517

1618
### Tools
1719

src/eca/config.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"claude-sonnet-4" {}}}
5959
"ollama" {:url "http://localhost:11434"
6060
:urlEnv "OLLAMA_API_URL"}}
61+
:defaultBehavior "agent"
6162
:behavior {"agent" {:systemPromptFile "prompts/agent_behavior.md"
6263
:disabledTools ["eca_preview_file_change"]}
6364
"plan" {:systemPromptFile "prompts/plan_behavior.md"
@@ -86,7 +87,6 @@
8687
:mcpTimeoutSeconds 60
8788
:lspTimeoutSeconds 30
8889
:mcpServers {}
89-
:defaultBehavior "agent"
9090
:welcomeMessage "Welcome to ECA!\n\nType '/' for commands\n\n"
9191
:index {:ignoreFiles [{:type :gitignore}]
9292
:repoMap {:maxTotalEntries 800

0 commit comments

Comments
 (0)