You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gptel: Presets can extend gptel-tools instead of replace
* gptel.el (gptel--apply-preset): Allow tool specifications in
presets to be additions instead of a replacement.
Presets are intended to be flexible enough to function in
different roles: as option presets, but also as agents,
permissions/capabilities and so on.
Previously, applying a preset that includes a `:tools'
specification would overwrite the current list of `gptel-tools'.
This made it impossible to use presets as permissions. For
example, we would like to give an LLM filesystem and web access by
applying two presets:
`@files @web do the thing`
But each preset sets the value of `gptel-tools', so the effect of
`files' is overwritten by `web'.
Tools can now be specified in a preset by placing an optional
`:append' key at the start, to extend the current value of
gptel-tools:
:tools '(:append "read-file" "create_file" ...)
This change will persist, but the `:append' convention is
experimental and subject to tweaking.
(gptel-request): Update documentation and TODO markers.
* gptel-transient.el (gptel--preset-mismatch-p): Account for
`:append' when indicating preset mismatches in gptel's transient
menus.
0 commit comments