@@ -17,25 +17,60 @@ documents:
17
17
path : src
18
18
contains : class
19
19
notContains : @deprecated
20
- showStats : true
20
+ render :
21
+ strategy : llm
22
+ showStats : true
23
+ showLineNumbers : true
24
+ contextLines : 5
21
25
` ` `
22
26
23
27
## Parameters
24
28
25
- | Parameter | Type | Default | Description |
26
- |---------------|---------------|------------|------------------------------------------------------------|
27
- | ` type` | string | required | Must be `"git_diff"` |
28
- | `description` | string | `""` | Human-readable description of the source |
29
- | `repository` | string | `"."` | Path to the git repository |
30
- | `commit` | string | `"staged"` | Git commit range or preset |
31
- | `filePattern` | string\|array | `"*.*"` | File pattern(s) to match |
32
- | `notPath` | array | `[]` | Patterns to exclude files |
33
- | `path` | string\|array | `[]` | Patterns to include only files in specific paths |
34
- | `contains` | string\|array | `[]` | Patterns to include only files containing specific content |
35
- | `notContains` | string\|array | `[]` | Patterns to exclude files containing specific content |
36
- | `showStats` | boolean | `true` | Whether to show commit stats in output |
37
- | `modifiers` | array | `[]` | Content modifiers to apply |
38
- | `tags` | array | [] | List of tags for this source |
29
+ | Parameter | Type | Default | Description |
30
+ |---------------|----------------|------------|------------------------------------------------------------|
31
+ | ` type` | string | required | Must be `"git_diff"` |
32
+ | `description` | string | `""` | Human-readable description of the source |
33
+ | `repository` | string | `"."` | Path to the git repository |
34
+ | `commit` | string | `"staged"` | Git commit range or preset |
35
+ | `filePattern` | string\|array | `"*.*"` | File pattern(s) to match |
36
+ | `notPath` | array | `[]` | Patterns to exclude files |
37
+ | `path` | string\|array | `[]` | Patterns to include only files in specific paths |
38
+ | `contains` | string\|array | `[]` | Patterns to include only files containing specific content |
39
+ | `notContains` | string\|array | `[]` | Patterns to exclude files containing specific content |
40
+ | `render` | object\|string | see below | Configuration for rendering diffs |
41
+ | `showStats` | boolean | `true` | **Deprecated:** Use `render.showStats` instead |
42
+ | `modifiers` | array | `[]` | Content modifiers to apply |
43
+ | `tags` | array | [] | List of tags for this source |
44
+
45
+ # # Render Configuration
46
+
47
+ The `render` parameter allows you to control how diffs are displayed. It can be either a string (for simple strategy
48
+ selection) or an object with detailed configuration :
49
+
50
+ ` ` ` yaml
51
+ # Simple form - just specify the strategy
52
+ render: llm
53
+
54
+ # Full configuration form
55
+ render:
56
+ strategy: llm # 'llm' or 'raw'
57
+ showStats: true
58
+ showLineNumbers: true
59
+ contextLines: 3
60
+ ` ` `
61
+
62
+ | Render Option | Type | Default | Description |
63
+ |-------------------|---------|---------|------------------------------------------------|
64
+ | `strategy` | string | `"raw"` | Rendering strategy : ` "raw"` or `"llm"` |
65
+ | `showStats` | boolean | `true` | Whether to show file stats in the output |
66
+ | `showLineNumbers` | boolean | `false` | Whether to show line numbers in diff output |
67
+ | `contextLines` | integer | `3` | Number of context lines to show around changes |
68
+
69
+ # ## Render Strategies
70
+
71
+ - **raw**: Standard git diff output with `+/-` notation
72
+ - **llm**: Enhanced diff format optimized for readability by both humans and LLMs. Uses semantic tags for additions and
73
+ removals.
39
74
40
75
# # Commit Range Presets
41
76
0 commit comments