getcursor / cursor

The AI Code Editor
https://cursor.com
25.76k stars 1.6k forks source link

@Prompts Keyword for Structured and Reusable Prompt Templates #1432

Open stevennevins opened 7 months ago

stevennevins commented 7 months ago

Is your feature request related to a problem? Please describe.

I often perform repetitive tasks, and to get the best results, I have to craft a descriptive prompt for the first generation. For subsequent tasks, I have to copy and edit a portion of the context. Often, I only edit a single line in the context of the subsequent tasks.

Describe the solution you'd like Custom prompt templates accessible via the @Prompts keyword/command. @Prompts can be created within the Cursor editor and provide a structured prompt for commonly performed tasks.

You are an AI assistant designed to perform a task.

Additional high-level context is helpful for the AI to perform the tasks to your specifications.

{{TASK_DESCRIPTION}}

Reiterate some context

I want to be able to create templates accessible with @Prompts and then provide context by named values to be inserted into these templates. So, for example, if this template were named Template, then I would want to be able to do:

@Prompts:@Template:@Task_Description:{{Task Description Inserted into Template}}

ypref commented 6 months ago

+1

dgokcin commented 5 months ago

+1

Jiayou-Chao commented 5 months ago

You can use / to call prompt edit, it's just that you can't add your customized prompts.

dgokcin commented 5 months ago

@Jiayou-Chao Yes, continue.dev has implemented this feature quite well. For reference, with the hope of implementing this in Cursor, I'm attaching the relevant documentation link. They are utilizing a JSON file located at ~/.continue/config.json for further configuration of their tool.

Custom Commands

image
deanrie commented 5 months ago

@Jiayou-Chao Да, continue.dev реализовал эту функцию довольно хорошо. Для справки, в надежде реализовать это в Cursor, я прикрепляю соответствующую ссылку на документацию. Они используют файл JSON, расположенный в ~/.continue/config.json, для дальнейшей настройки своего инструмента.

Пользовательские команды

Yes, a good example. I would like it to be in the Cursor, as Continue and GitHub Copilot have it.

3choff commented 2 months ago

+1

iraklisg commented 2 months ago

I do agree that Continue Dev has well implemented this feature. Related issue https://github.com/getcursor/cursor/issues/1019