This Visual Studio Code extension provides syntax highlighting for poggers'.prompt files.
Features
Syntax highlighting for:
Labels (e.g., system:, assistant:)
Annotations (e.g., @OutputSchema, @JSONOutput)
JSON-like objects
Installation
Install Visual Studio Code.
Open the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or by pressing Ctrl+Shift+X.
Search for Prompt Syntax Highlight and click Install.
Reload VS Code to activate the extension.
Usage
To use the syntax highlighting, simply open a file with the .prompt extension. The highlighting will be automatically applied.
Example .prompt File
MODEL_TEMPERATURE=0.5 // This goes into the request
system:
Generate 5 items sold in an RPG fantasy shop that might be useful for the player, based on their current stats.
@OutputSchema
[
{
"name": string,
"type": "sword" | "potion" | "misc",
"price": number + " coins" # should range from 5 to 20 coins
}
]
@JSONOutput
user:
@PlayerStats