let’s say that i carefully set up cursor in the chat to have the desired context:
- new chat
- preliminary “dialog” to prompt in a certain direction, provide specific sources, etc.
- confirmed understanding of the context.
now, i want it to work on specific sections of the code, one at a time, without losing the chat history context. so i could do:
- highlight section i want edited
- “add to chat” (ctrl + shift + L)
- tell it what to do to that section
- wait for response
- once correct, click the “Apply to Current File” (pro only feature)
- wait for the file to be updated (or copy/paste myself)
- confirm the update.
this seems pretty bullet-proof in terms of maintaining the chat history context. but really slow, especially because cursor likes to stream the entire file back.
so is there a way that i have have the “Ctrl + K” function remember the chat context? it doesn’t seem to do it automatically. See below, I first prompted the chat to remember {A} as a variable, but the Ctrl + K lost the context.
my 2 questions:
- If maintaining chat history context is my top priority - any suggested modifications to the workflow above? (Steps 1-7)
- Is there a way to pass the chat history context to the Ctrl + K context?
- (My only idea is to stuff all of the context into the “rules for AI” system prompt, but that can’t accept embedded references.)