I’ve added this to my Cursor Settings
> General
> Rules for AI
End every request with "Total context size: ~nk tokens" and list the files you have in view.
I’ve added this to my Cursor Settings
> General
> Rules for AI
End every request with "Total context size: ~nk tokens" and list the files you have in view.
For reference this is the transparency Cline gives, it would be great to have something like this, my workaround at least gives some idea of what is going on (Assuming it’s accurate).
It would be really nice if cursor could implement something like this, to give us a general idea of the context used and at the same time allow us to delete certain files from the context if necessary to use the available one more efficiently.
I also tried to expose the current model and remaining fast requests but it was wildly inaccurate
Hey, in Cursor, you can click on the three dots at the bottom of the chat to view the size of the used context.
Unfortunately… I tried to create a rule that did the above and found the disparity in tokens and selected model between both the prompt and even fetching against the authenticated https://www.cursor.com/api/usage?user=user_${user_id}
cursor API
As far as I know there is no official publicly exposed API.
Wow it sure gets defensive about how it figures out the context size…
(Was using gemini-flash-2.5-preview)
tl,dr: {context_size}
was working because this particular keyword seemed to be a read-only property that’s provided by Cursor.
It kinda-sorta is inconvenient that {javascriptFunctions()}
were interpolated inside the quasi-XML/YAML format of the rule too – and this too was codegen-ed.
Everything above with a grain of since it’s questionable halulu.
I think I hit the fourth wall…
Cursor really don’t want users to know that less tokens make Cursor golden fish.
For example, if claude-3.7-sonnet read like 10+ files, then it forget what is the task, and start to summrize the project…