Add support for JSON prompts alongside TEXT prompt type

- Add 'type' column to prompts.csv to distinguish JSON vs TEXT prompts
- Update script.js to render JSON prompts with syntax highlighting
- Add JSON type badge to prompt cards
- Update showModal to handle JSON prompts properly
- Add CSS styles for JSON syntax highlighting and type badges
- Add 3 JSON prompt examples (API Response Generator, Code Review Assistant, Data Transformer)
- Update CSV linter workflow to validate the new 'type' column
- Update README.md with JSON prompt examples using code blocks

Co-Authored-By: Fatih Kadir Akın <fatihkadirakin@gmail.com>
This commit is contained in:
Devin AI
2025-11-28 09:17:53 +00:00
parent 9f788ded6a
commit a584a3a1a6
5 changed files with 493 additions and 233 deletions

View File

@@ -37,16 +37,21 @@ jobs:
with open("prompts.csv", "r", encoding="utf-8") as f:
reader = csv.reader(f)
headers = next(reader)
if headers != ["act", "prompt", "for_devs"]:
print("Error: CSV headers must be exactly [act, prompt, for_devs]")
if headers != ["act", "prompt", "for_devs", "type"]:
print("Error: CSV headers must be exactly [act, prompt, for_devs, type]")
exit(1)
for row_num, row in enumerate(reader, 3):
if len(row) != 3:
print(f"Error: Row {row_num} has {len(row)} columns, expected 2")
valid_types = ["TEXT", "JSON"]
for row_num, row in enumerate(reader, 2):
if len(row) != 4:
print(f"Error: Row {row_num} has {len(row)} columns, expected 4")
exit(1)
if not row[0] or not row[1] or not row[2]:
if not row[0] or not row[1] or not row[2] or not row[3]:
print(f"Error: Row {row_num} has empty values")
exit(1)
if row[3] not in valid_types:
print(f"Error: Row {row_num} has invalid type \"{row[3]}\". Must be TEXT or JSON")
exit(1)
print("CSV format OK")
'; then
echo "::error::CSV format check failed"
exit 1