Skip to content

Commit 8b97018

Browse files
committed
docs: improve file titles
1 parent b1940f6 commit 8b97018

File tree

5 files changed

+37
-45
lines changed

5 files changed

+37
-45
lines changed

docs/configuration.md

Lines changed: 22 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ There are multiples ways to configure ECA:
1010

1111
Convenient for users and multiple projects
1212

13-
`~/.config/eca/config.json`
14-
```javascript
13+
```javascript title="~/.config/eca/config.json"
1514
{
1615
"defaultBehavior": "plan"
1716
}
@@ -21,8 +20,7 @@ There are multiples ways to configure ECA:
2120

2221
Convenient for users
2322

24-
`.eca/config.json`
25-
```javascript
23+
```javascript title=".eca/config.json"
2624
{
2725
"defaultBehavior": "plan"
2826
}
@@ -60,8 +58,7 @@ For MCP servers configuration, use the `mcpServers` config, examples:
6058

6159
=== "Stdio"
6260

63-
`~/.config/eca/config.json`
64-
```javascript
61+
```javascript title="~/.config/eca/config.json"
6562
{
6663
"mcpServers": {
6764
"memory": {
@@ -76,8 +73,7 @@ For MCP servers configuration, use the `mcpServers` config, examples:
7673

7774
=== "HTTP-streamable"
7875

79-
`~/.config/eca/config.json`
80-
```javascript
76+
```javascript title="~/.config/eca/config.json"
8177
{
8278
"mcpServers": {
8379
"cool-mcp": {
@@ -97,7 +93,7 @@ Check some examples:
9793

9894
=== "Allow any tools by default"
9995

100-
```javascript
96+
```javascript title="~/.config/eca/config.json"
10197
{
10298
"toolCall": {
10399
"approval": {
@@ -109,7 +105,7 @@ Check some examples:
109105

110106
=== "Allow all but some tools"
111107

112-
```javascript
108+
```javascript title="~/.config/eca/config.json"
113109
{
114110
"toolCall": {
115111
"approval": {
@@ -125,7 +121,7 @@ Check some examples:
125121

126122
=== "Ask all but all tools from some mcps"
127123

128-
```javascript
124+
```javascript title="~/.config/eca/config.json"
129125
{
130126
"toolCall": {
131127
"approval": {
@@ -143,7 +139,7 @@ Check some examples:
143139

144140
__`argsMatchers`__ is a map of argument name by list of [java regex](https://www.regexplanet.com/advanced/java/index.html).
145141

146-
```javascript
142+
```javascript title="~/.config/eca/config.json"
147143
{
148144
"toolCall": {
149145
"approval": {
@@ -159,7 +155,7 @@ Check some examples:
159155

160156
=== "Denying a tool"
161157

162-
```javascript
158+
```javascript title="~/.config/eca/config.json"
163159
{
164160
"toolCall": {
165161
"approval": {
@@ -181,7 +177,7 @@ __The `manualApproval` setting was deprecated and replaced by the `approval` one
181177

182178
You can configure the maximum number of lines returned by the `eca_read_file` tool:
183179

184-
```javascript
180+
```javascript title="~/.config/eca/config.json"
185181
{
186182
"toolCall": {
187183
"readFile": {
@@ -209,8 +205,7 @@ Placeholders in the format `{{argument_name}}` within the `command` string will
209205

210206
=== "Example 1"
211207

212-
`~/.config/eca/config.json`
213-
```javascript
208+
```javascript title="~/.config/eca/config.json"
214209
{
215210
"customTools": {
216211
"web-search": {
@@ -232,8 +227,7 @@ Placeholders in the format `{{argument_name}}` within the `command` string will
232227

233228
=== "Example 2"
234229

235-
`~/.config/eca/config.json`
236-
```javascript
230+
```javascript title="~/.config/eca/config.json"
237231
{
238232
"customTools": {
239233
"file-search": {
@@ -266,25 +260,23 @@ Prompts can use variables like `$ARGUMENTS`, `$ARG1`, `ARG2`, to replace in the
266260

267261
A `.eca/commands` folder from the workspace root containing `.md` files with the custom prompt.
268262

269-
`.eca/commands/check-performance.md`
270-
```markdown
263+
```markdown title=".eca/commands/check-performance.md"
271264
Check for performance issues in $ARG1 and optimize if needed.
272265
```
273266

274267
=== "Global custom commands"
275268

276269
A `$XDG_CONFIG_HOME/eca/commands` or `~/.config/eca/commands` folder containing `.md` files with the custom command prompt.
277270

278-
`~/.config/eca/commands/check-performance.md`
279-
```markdown
271+
```markdown title="~/.config/eca/commands/check-performance.md"
280272
Check for performance issues in $ARG1 and optimize if needed.
281273
```
282274

283275
=== "Config"
284276

285277
Just add to your config the `commands` pointing to `.md` files that will be searched from the workspace root if not an absolute path:
286278

287-
```javascript
279+
```javascript title="~/.config/eca/config.json"
288280
{
289281
"commands": [{"path": "my-custom-prompt.md"}]
290282
}
@@ -305,8 +297,7 @@ There are 3 possible ways to configure rules following this order of priority:
305297

306298
A `.eca/rules` folder from the workspace root containing `.md` files with the rules.
307299

308-
`.eca/rules/talk_funny.md`
309-
```markdown
300+
```markdown title=".eca/rules/talk_funny.md"
310301
---
311302
description: Use when responding anything
312303
---
@@ -318,8 +309,7 @@ There are 3 possible ways to configure rules following this order of priority:
318309

319310
A `$XDG_CONFIG_HOME/eca/rules` or `~/.config/eca/rules` folder containing `.md` files with the rules.
320311

321-
`~/.config/eca/rules/talk_funny.md`
322-
```markdown
312+
```markdown title="~/.config/eca/rules/talk_funny.md"
323313
---
324314
description: Use when responding anything
325315
---
@@ -331,7 +321,7 @@ There are 3 possible ways to configure rules following this order of priority:
331321

332322
Just add toyour config the `:rules` pointing to `.md` files that will be searched from the workspace root if not an absolute path:
333323

334-
```javascript
324+
```javascript title="~/.config/eca/config.json"
335325
{
336326
"rules": [{"path": "my-rule.md"}]
337327
}
@@ -343,7 +333,7 @@ ECA allows to totally customize the prompt sent to LLM via the `behavior` config
343333

344334
=== "Example: my-behavior"
345335

346-
```javascript
336+
```javascript title="~/.config/eca/config.json"
347337
{
348338
"behavior": {
349339
"my-behavior": {
@@ -376,7 +366,7 @@ Examples:
376366

377367
=== "Notify after prompt finish"
378368

379-
```javascript
369+
```javascript title="~/.config/eca/config.json"
380370
{
381371
"hooks": {
382372
"notify-me": {
@@ -394,7 +384,7 @@ Examples:
394384

395385
=== "Block specific tool call checking hook arg"
396386

397-
```javascript
387+
```javascript title="~/.config/eca/config.json"
398388
{
399389
"hooks": {
400390
"check-my-tool": {
@@ -416,7 +406,7 @@ Examples:
416406

417407
To configure, add your OTLP collector config via `:otlp` map following [otlp auto-configure settings](https://opentelemetry.io/docs/languages/java/configuration/#properties-general). Example:
418408

419-
```javascript
409+
```javascript title="~/.config/eca/config.json"
420410
{
421411
"otlp": {
422412
"otel.exporter.otlp.metrics.protocol": "http/protobuf",

docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Eca is written in Clojure and compiled into a native binary via graalvm.
4646

4747
Install using [mise](https://mise.jdx.dev)
4848

49-
```
49+
```bash
5050
# Install the plugin
5151
mise plugin install eca https://github.com/editor-code-assistant/eca-mise-plugin
5252

docs/models.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ For more details, check the [config schema](./configuration.md#all-configs).
2626

2727
Example:
2828

29-
`~/.config/eca/config.json`
30-
```javascript
29+
```javascript title="~/.config/eca/config.json"
3130
{
3231
"providers": {
3332
"openai": {
@@ -81,8 +80,7 @@ Examples:
8180

8281
=== "Custom provider"
8382

84-
`~/.config/eca/config.json`
85-
```javascript
83+
```javascript title="~/.config/eca/config.json"
8684
{
8785
"providers": {
8886
"my-company": {
@@ -102,8 +100,7 @@ Examples:
102100

103101
Using `modelName`, you can configure multiple model names using same model with different settings:
104102

105-
`~/.config/eca/config.json`
106-
```javascript
103+
```javascript title="~/.config/eca/config.json"
107104
{
108105
"providers": {
109106
"openai": {
@@ -155,7 +152,7 @@ Use `keyRc` in your provider config to read credentials from `~/.authinfo(.gpg)`
155152

156153
Example:
157154

158-
```javascript
155+
```javascript title="~/.config/eca/config.json"
159156
{
160157
"providers": {
161158
"openai": {"keyRc": "api.openai.com"},
@@ -203,7 +200,7 @@ Notes:
203200

204201
=== "LiteLLM"
205202

206-
```javascript
203+
```javascript title="~/.config/eca/config.json"
207204
{
208205
"providers": {
209206
"litellm": {
@@ -231,7 +228,7 @@ Notes:
231228

232229
or manually via config:
233230

234-
```javascript
231+
```javascript title="~/.config/eca/config.json"
235232
{
236233
"providers": {
237234
"openrouter": {
@@ -260,7 +257,7 @@ Notes:
260257

261258
or manually via config:
262259

263-
```javascript
260+
```javascript title="~/.config/eca/config.json"
264261
{
265262
"providers": {
266263
"deepseek": {
@@ -288,7 +285,7 @@ Notes:
288285

289286
or manually via config:
290287

291-
```javascript
288+
```javascript title="~/.config/eca/config.json"
292289
{
293290
"providers": {
294291
"azure": {
@@ -314,7 +311,7 @@ Notes:
314311

315312
or manually via config:
316313

317-
```javascript
314+
```javascript title="~/.config/eca/config.json"
318315
{
319316
"providers": {
320317
"z-ai": {

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ theme:
2727
repo: fontawesome/brands/github
2828
features:
2929
- navigation.tabs
30+
- content.code.copy
31+
- content.code.select
3032

3133
extra:
3234
analytics:

src/eca/shared.clj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@
127127
:last-message-cost (tokens->cost input-tokens input-cache-creation-tokens input-cache-read-tokens output-tokens model-capabilities)
128128
:session-cost (tokens->cost total-input-tokens total-input-cache-creation-tokens total-input-cache-read-tokens total-output-tokens model-capabilities)))))
129129

130+
(defn sum [a b]
131+
(+ a b))
132+
130133
(defn map->camel-cased-map [m]
131134
(let [f (fn [[k v]]
132135
(if (keyword? k)

0 commit comments

Comments
 (0)