opencode
opencode copied to clipboard
add experimental.chat.system.transform hook
Add a system prompt transform hook to allow plugins to alter system messages.
Plugins receive a mutable string[] containing the system prompt parts and can modify, add, or remove entries.
If a plugin empties the array, the original is restored and an error is logged to prevent downstream issues with empty system prompts.
will rebase when PR #5462 is merged
moved to and merged in #5542