Commit graph

2 commits

Author SHA1 Message Date
Karthik Chikmagalur
8dbcbbb908 gptel-org: Move session save/restore code for Org
* gptel.el (gptel--restore-backend, gptel--save-state,
gptel--restore-state): Move the Org-specific code for saving and
restoring state to gptel-org.

* gptel-org.el (gptel-org--entry-properties,
gptel-org--save-state, gptel-org--restore-state): Org-specific
code for saving and restoring state using Org properties, moved
from gptel-org.
2024-04-04 00:25:09 -07:00
Karthik Chikmagalur
2982ede17d gptel-org: Add gptel-org
* gptel.el (gptel--create-prompt): Split the Org mode logic in
`gptel--create-prompt` into gptel-org.el.

* gptel-org.el (gptel-org-branching-context,
gptel-org--create-prompt): Handle prompt creation for Org buffers
in `gptel-org--create-prompt`.  The option
`gptel-org-branching-context` limits the context in Org buffers to
the direct ancestors of the active heading.  This is useful for
conversations with branches.  gptel-org.el is intended to
eventually contain all the Org mode specific gptel code, and will
not be loaded unless gptel is called in an Org buffer.
2024-04-04 00:25:08 -07:00