karthink / gptel

A simple LLM client for Emacs
GNU General Public License v3.0
1.03k stars 111 forks source link

new flag introduced: it forces prompt context that is sent to backend, be more explicit #329

Open vibrys opened 1 week ago

vibrys commented 1 week ago

@karthink, thank you very much for the great gptel package. It's great value is noticeable.

I'm issuing PR to prevent users from accidental sending too many data during requesting from org mode buffer.

The idea is to force both branching and topic be present on the path. If they both are included, then one may assume the user set these two intentionally thus sends that part of buffer (s)he wants.

the setting by default is nil (nothing changes to existing users), but IMO it may be considered to be set to true as default.

please let me know what you think about the change.

kind regards, Vibrys

vibrys commented 1 week ago

maybe the idea of explicit context should be spread to other major modes as well. If yes, then if the gptel-org-force-branching-context-with-topic flag is true, then:

  1. for org-mode the behavior is just as in this pull request
  2. for other modes it's enough that some region is marked.

if this is good idea, then gptel-org-force-branching-context-with-topic should be renamed, for example to: gptel-force-context ?

regards, Vibrys

vibrys commented 1 week ago

I've just made the setting more generic, just as described in the message above. Flag name: gptel-force-prompt-context-be-explicit