-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gptel-mode cannot be properly deactivated. #424
Comments
gptel.el (gptel-mode): Remove state-saving function placed in `before-save-hook' by `gptel-mode' when turning it off. (#424)
Oversight on my part (I think), thanks for catching that. I removed that behavior when turning off That said, if you turn off |
thanks, for the fix! it works great. Out of curiosity, are the annotations you saved via put-text-property also removed if gptel-mode is disabled? I have only seen the (remove-hook 'before-save-hook #'gptel--save-state t) line in the diff, but i didnt experience any malfunction of the code. |
No, the text properties stay. They are harmless at worst, so there is no reason to remove them, I think. And in general, they add an extra layer of redundancy to the chat state. For example, if you turn off |
so my question is, if i enable |
|
For this reason, You are imagining a different system where the text properties are (effectively) unnecessary, and |
When
If there are other regions marked using text properties as gptel responses not included in You cannot produce a mangled state unless you've manually edited the |
My mental image for gptel-mode is as follows:
If i have gptel-mode running in a n org file all sorts of functions are activated, and memory structures are being held in memory.
If i turn the mode off, it is deactivated and the single source of truth is the file
Information on which text written by me, and which text is from the LLM is saved in the GPTEL_BOUNDS property, like this.
But apparenttly, even after deactivating gptel-mode, there is still information stored via put-text-property:
and when saving the file, some part of the still active gptel-mode overwrites the :GPTEL_BOUNDS: property.
While trying to debug, bug #409 I figured out only way, to change the :GPTEL_BOUNDS: property - even if gptel-mode is deactivated- is do close the buffer and reload the buffer from disk. This doesnt feel right. Do you agree that the behaviour should be changed?
The text was updated successfully, but these errors were encountered: