-
Notifications
You must be signed in to change notification settings - Fork 332
Description
Whenever I edit a file that is located at the start of the gptel context that invalidates potentially all kvcache.
Statistically there's significant locality on the files I modify most frequently.
I wish whenever a file added with gptel-add-file is updated on disk (either because it was modified and saved to disk by the editor, and also because its buffer was invalidated after a tool like ripgrep-edit modified the file from outside the editor) the location of the file in the gptel context should be moved to the bottom of context, so as I keep editing it repeteadly, it will invalidate the "whole" kvcache at most once.
Describe the solution you'd like
I guess I could try to achieve it from outside gptel too, but I don't know if there's enough visibility into the gptel-context to achieve this...
I think it could be the default behavior considering currently gptel doesn't guarantee any order in the context.
Describe alternatives you've considered
I don't think there's any alternatives to avoid recomputing all kvcache every time I update (or invalidate) a file in-gptel-context.