twinny icon indicating copy to clipboard operation
twinny copied to clipboard

Providing reference files in a prompt template?

Open gpinkham opened this issue 1 year ago • 3 comments

ok maybe I'm thinking of this wrong. But I have not been able to get the "add-tests" to give me a Rails Rspec to my liking. its pretty vanilla and I'd like it to be closer to what all of our other Rspecs are like (using the customer helper for login etc etc). So I was thinking that perhaps I could provide a "link" to a reference file in the Prompt? I would think that was what the embeddings is for; to give it reference but it doesn't seem to impact how it generates a set of tests.

gpinkham avatar Sep 26 '24 21:09 gpinkham

Thanks for the issue report. You're right actually we don't have any way to provide context to the default prompts at the moment and is something that should be added. How do you envisage it working?

rjmacarthy avatar Oct 03 '24 18:10 rjmacarthy

Honestly I'm not sure. I had originally thought it might be something like a reference to a file and the template engine just includes the text of the file into the prompt. But I guess I could just as easily copy it into the prompt myself. hmm let me think about it and try a few things. I did just notice that in the templates folder there is a "relevant-files" template. but not sure how that one is supposed to work.

gpinkham avatar Oct 03 '24 19:10 gpinkham

The relevant files template works when using the @ workspace command in the chat for embeddings. For right click menu there is no way to use embeddings right now. Because embeddings are slower and often give crappy answers it's only used when the user specifically chooses to do so.

rjmacarthy avatar Oct 16 '24 06:10 rjmacarthy