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-org: Obey gptel-org settings when sending regions
* gptel.el (gptel--create-prompt): Change how prompts are created
from active regions in Org mode. Previously the text in the
region was parsed verbatim without any pre-processing irrespective
of major-mode. Now active regions in Org mode are subjected to
gptel-org-related settings such as `gptel-org-branching-context'
and `gptel-org-ignore-elements', as well as
`gptel-prompt-filter-hook'.
The hope is that this approach is more intuitive and in line with
the user's expectations.
* gptel-org.el (gptel-org--create-prompt): Rewrite how branching
context is handled. Previously the lineage calculation included
an 'org-data element at point 1. Now the lineage calculation only
returns headline start positions, and we tack on (point-min) to
the list explicitly, avoiding a couple of edge cases. The
headline start positions returned by the lineage calculation are
now adjusted correctly for narrowed buffers and active-regions.
* test: Update tests for new prompt-from-region rules
0 commit comments