-
Notifications
You must be signed in to change notification settings - Fork 180
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
Jump to file from context buffer not working. #482
Comments
Another minor problem likely to be in the same part of the source code: The gptel-context buffer is not updated when context is deleted. That is, when context is deleted using =d= and =C-c C-c= the context buffer is not updated. The deleted context is still shown. The context buffer only appears to be updated when =gptel-add= or =gptel-add-file= is used. Doing a manual update =g= in the context also updates the context buffer. |
Thanks, I'll fix this.
What do you mean by the "context buffer" here? The buffer showing all the context chunks, or the source buffer for one of these chunks? |
The buffer showing all the context chunks. |
Then I don't understand this:
After |
Not if it's open in two windows or one (re)selects it without adding anything else to it. It still exists, with stale data. Not a major problem, but confusing. |
Got it, thanks for reporting this too. I'll fix both bugs when I can. |
* gptel-context.el (gptel-context-confirm, gptel-context-visit): - Refresh the context buffer when confirming deletions. - Jump to files correctly when calling `gptel-context-visit'.
I've pushed a fix to both bugs. Please test. |
Both bugs appear to be fixed. Thank you! There appears to remain some stateful problems with the context buffer though. Reproduce: open the content buffer in a separate window. Add context to it and that buffer will not update. This looks very similar to the problem you just fixed, where the buffer was not updated when items were deleted from it. It's also not updated when context is added to it. However, when you reopen/revisit context via the gptel menu C command context is correctly updated. That is, updates occur on view events not when the context is changed. Given the modus operandi for the system at the moment, where the presumption seems to be that the context buffer is only shown upon gptel view events, and hidden again automatically based on actions taken via the gptel events, one normally wouldn't see this problem. However, if context buffers become things one manages in multiplicity and explicitly in future (as I would suggest), their update should be synchronized to events that actually add or remove context, and not upon events related to viewing of context buffers. That is, the context buffer should always reflect the correct context state given the most recent modifications made to the context, regardless of whether the context buffer(s) is(are) visible or not. |
This is how other listings like buffer-menu, ibuffer and dired work -- you have to refresh the display with |
Fair enough, hitting |
I consider this bug (jump from context) close with thanks. |
Please update gptel first -- errors are often fixed by the time they're reported.
Bug Description
Jump to file from context buffer not working. This appears to work for buffers and regions, but not files.
Backend
None
Steps to Reproduce
When I add a file to context, and then try to jump to the file from the context window, an error occurs.
The reported error is
funcall-interactively: Wrong type argument: overlayp, "~/Downloads/Roadmap-V1.png"
Additional Context
Emacs 28.2
Backtrace
Log Information
No response
The text was updated successfully, but these errors were encountered: