Replies: 7 comments 10 replies
-
|
@nleve I love this! We can definitely add it to gptel as an optional feature. However, I gave the code only a cursory look and want to go over the implementation more carefully. I'm quite wary of adding gptel code to |
Beta Was this translation helpful? Give feedback.
-
|
@karthink Thank you, it may very well be that we only need one or the other (or neither), I'm not very familiar with this area. I had run into some weird edge cases during testing (streaming responses & rehydrating a gptel buffer from a file) that seemed to be addressed by doing both. But I imagine it can be simplified. I'll take another crack at it too when I get a chance. |
Beta Was this translation helpful? Give feedback.
-
|
@nleve Over the weekend I played around with this code (the second version without I fired up the CPU and memory profilers, and from what I can tell the two main issues are using one overlay per line, leading to thousands of overlays (and increased memory usage), and I can fix the latter, but I unfortunately I don't think there's a way around using one overlay per line. I wrote a version of this code that uses one overlay across the whole response region, splitting it or joining two of them as needed. This works, but has issues: this overlay can only store one value for This can happen if you use screencast_20251013T191834.mp4This may be a fair compromise, all things considered. Also, I can confirm that |
Beta Was this translation helpful? Give feedback.
-
|
On the branch It uses the single overlay per response region method. It's still buggy (some jit-lock issue) but feel free to try it out. |
Beta Was this translation helpful? Give feedback.
-
|
I was thinking that using these gutter indicators would be a nice way to indicate text in buffers that is being used as context for a gptel request too. Currently a buffer used as context for gptel will have it's background set to black, but a gutter indicator would be more elegant ( i think). What do you think? |
Beta Was this translation helpful? Give feedback.
-
|
I have
Will update the branch soon. |
Beta Was this translation helpful? Give feedback.
-
|
I have now pushed To use it, turn on By default, it uses the margin to highlight responses, not the fringe. This is because the default is expected to work everywhere, including in the tty. To customize this, see There are many things not customizable, like the fringe thickness or the margin indicator style. Ignored and tool call regions are highlighted too, currently in non-customizable ways. I'll look into extracting these into user options if people ask for it frequently. There might still be edge cases. Please test. |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
-
I use gptel all the time, but one pain point for me has been determining whether the point is currently in LLM-response text, or outside it. I don't really like relying on response prefixes, really I want to see which text is LLM-generated more explicitly.
To address this I wrote a gptel-gutter-mode. Inspired by git-gutter-mode and diff-hl-mode, it draws bitmap lines in the fringe when text has either the
responseorignoregptel text property.Screencast_20251005_190059.webm
Would this be of interest to include (as optional) in gptel? To me it doesn't seem worth publishing as a separate package, but I could do that instead if there was interest.
Beta Was this translation helpful? Give feedback.
All reactions