Hi,
I don’t know how much of a good idea it would be but I think it could be interesting for long variable content to be ellipsis when too long to avoid causing the content to be too long making AI impossible to interpret correctly the file.
Here’s a good example of a use case I faced:
I built a small tool for myself that has more than 100K lines of code, but only maybe 10% or less of it is actually code. The rest is variables with data (like CSV data) or return functions. These variables and functions only serve as “pick and choose” content to add in the AI prompt that will be sent for request.
Imagine, if the final prompt is 13K token long, but we have 20-50 variable and return function that contain 2-6K token long content, then the file become extremely long quickly, but all of this content is not necessary for the AI to know an interpret.
So, if there’s a way to interpret the data in variables or return functions (making sure that we’re not passing on important data such as long HTML dynamically added, rather than CSV data that is always in the same structure or the full content of a PDF file) then giving the first few lines of that data to AI rather than the full data would probably reduce some file sizes by a lot in some use cases.
Of course there would be edge cases where maybe it would be better to “trigger” the activation of the full content, but at least in my use case which often happens when I simply want to feed lots of data into the prompt, that would reduce the code size by a lot and would lighten the load on Cursor interpretation.
Let me know what you think and if that make sense.
Thanks!