- {(() => {
- const templateContent =
- template.detailedPrompt || template.description || '';
- if (!templateContent)
- return template.framework || 'No template content';
-
- // Format template content to show structure (Role, Task, Format)
- const lines = templateContent
- .split('\n')
- .filter((line) => line.trim());
- if (lines.length === 0) return templateContent;
-
- // Extract ROLE, TASK, FORMAT from the structure
- let role = '';
- let task = '';
- let format = '';
-
- lines.forEach((line) => {
- const lowerLine = line.toLowerCase();
- if (lowerLine.includes('role') || lowerLine.includes('act as')) {
- role = line.replace(/.*(?:role|act as)[:\s]*/i, '').trim();
- } else if (
- lowerLine.includes('task') ||
- lowerLine.includes('create')
- ) {
- task = line.replace(/.*(?:task|create)[:\s]*/i, '').trim();
- } else if (
- lowerLine.includes('format') ||
- lowerLine.includes('show as')
- ) {
- format = line.replace(/.*(?:format|show as)[:\s]*/i, '').trim();
- }
- });
-
- // Build formatted display showing the structure
- if (role || task || format) {
- const parts: string[] = [];
- if (role) parts.push(`Role: ${role}`);
- if (task) parts.push(`Task: ${task}`);
- if (format) parts.push(`Format: ${format}`);
- return parts.join('\n');
- }
-
- // Fallback: show the full content (truncated if too long)
- return templateContent.length > 200
- ? `${templateContent.substring(0, 200)}...`
- : templateContent;
- })()}
+
+
+ {shortDescriptionLine}
|
-
+ |
{formatDate(template.created_at)}
|
-
-
+
+
{isSelected &&
dropdownPosition &&
createPortal(
Edit
@@ -637,7 +697,7 @@ export default function TemplatesView() {
e.preventDefault();
handleDeleteTemplate(template);
}}
- className="flex w-full items-center gap-2 px-4 py-2 text-left text-sm text-red-600 hover:bg-gray-100 dark:text-red-400 dark:hover:bg-gray-700"
+ className="hover:bg-fig-Surface-one-standard flex w-full items-center gap-2 px-4 py-2 text-left text-sm font-normal leading-5 text-destructive"
>
})
-
-
-
+
+ |
-
-
+
+
{persona.description || 'No description'}
-
+
|
-
+ |
{formatDate(persona.created_at)}
|
-
-
+
+
{isSelected &&
dropdownPosition &&
createPortal(
Edit
@@ -757,7 +850,7 @@ export default function TemplatesView() {
e.preventDefault();
handleDeletePersona(persona);
}}
- className="flex w-full items-center gap-2 px-4 py-2 text-left text-sm text-red-600 hover:bg-gray-100 dark:text-red-400 dark:hover:bg-gray-700"
+ className="hover:bg-fig-Surface-one-standard flex w-full items-center gap-2 px-4 py-2 text-left text-sm font-normal leading-5 text-destructive"
>
})
-
+
Create Template
@@ -1072,7 +1165,7 @@ function CreateTemplateModal({
)}
| | | | | |