mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
Diffs: restore system prompt guidance (#36904)
Merged via squash.
Prepared head SHA: 1b3be3c879
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
committed by
GitHub
parent
06a229f98f
commit
1a67cf57e3
@@ -10,7 +10,7 @@ read_when:
|
||||
|
||||
# Diffs
|
||||
|
||||
`diffs` is an optional plugin tool and companion skill that turns change content into a read-only diff artifact for agents.
|
||||
`diffs` is an optional plugin tool with short built-in system guidance and a companion skill that turns change content into a read-only diff artifact for agents.
|
||||
|
||||
It accepts either:
|
||||
|
||||
@@ -23,6 +23,8 @@ It can return:
|
||||
- a rendered file path (PNG or PDF) for message delivery
|
||||
- both outputs in one call
|
||||
|
||||
When enabled, the plugin prepends concise usage guidance into system-prompt space and also exposes a detailed skill for cases where the agent needs fuller instructions.
|
||||
|
||||
## Quick start
|
||||
|
||||
1. Enable the plugin.
|
||||
@@ -44,6 +46,29 @@ It can return:
|
||||
}
|
||||
```
|
||||
|
||||
## Disable built-in system guidance
|
||||
|
||||
If you want to keep the `diffs` tool enabled but disable its built-in system-prompt guidance, set `plugins.entries.diffs.hooks.allowPromptInjection` to `false`:
|
||||
|
||||
```json5
|
||||
{
|
||||
plugins: {
|
||||
entries: {
|
||||
diffs: {
|
||||
enabled: true,
|
||||
hooks: {
|
||||
allowPromptInjection: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
This blocks the diffs plugin's `before_prompt_build` hook while keeping the plugin, tool, and companion skill available.
|
||||
|
||||
If you want to disable both the guidance and the tool, disable the plugin instead.
|
||||
|
||||
## Typical agent workflow
|
||||
|
||||
1. Agent calls `diffs`.
|
||||
|
||||
Reference in New Issue
Block a user