diff --git a/frontend/src/pages/agent-studio.tsx b/frontend/src/pages/agent-studio.tsx index 4578265..fdf14f2 100644 --- a/frontend/src/pages/agent-studio.tsx +++ b/frontend/src/pages/agent-studio.tsx @@ -426,6 +426,29 @@ const LEAD_REPLY_TEMPLATE_PRESETS: AgentTemplatePreset[] = [ const ALL_AGENT_TEMPLATE_PRESETS = [...AGENT_TEMPLATE_PRESETS, ...LEAD_REPLY_TEMPLATE_PRESETS]; +const TEMPLATE_SECTION_OPTIONS: Array<{ + value: AgentTemplateFocus; + label: string; + description: string; + icon: string; + countLabel: string; +}> = [ + { + value: 'content', + label: 'Контент-шаблоны', + description: 'Посты, Reels, Stories, кейсы и FAQ для публикаций.', + icon: mdiBullhornOutline, + countLabel: `${AGENT_TEMPLATE_PRESETS.length} сценариев`, + }, + { + value: 'lead_reply', + label: 'Lead-шаблоны', + description: 'Ответы в директ, вопрос о цене, follow-up и запись на замер.', + icon: mdiAccountArrowRight, + countLabel: `${LEAD_REPLY_TEMPLATE_PRESETS.length} сценариев`, + }, +]; + const GOAL_OPTIONS: Array<{ value: GoalValue; label: string }> = [ { value: 'lead_generation', label: 'Лиды и заявки' }, { value: 'brand_awareness', label: 'Узнаваемость бренда' }, @@ -976,6 +999,7 @@ const AgentStudio = () => { const [saveResult, setSaveResult] = useState(null); const [copyMessage, setCopyMessage] = useState(''); const [activeTemplateId, setActiveTemplateId] = useState(''); + const [activeTemplateSection, setActiveTemplateSection] = useState('lead_reply'); const canReadBriefs = hasPermission(currentUser, 'READ_CONTENT_BRIEFS'); const canReadChannels = hasPermission(currentUser, 'READ_SOCIAL_CHANNELS'); @@ -1132,6 +1156,7 @@ const AgentStudio = () => { })); setActiveTemplateId(template.id); + setActiveTemplateSection(template.focus || 'content'); setGeneratedDraft(null); setValidationErrors([]); setGenerationError(''); @@ -1473,11 +1498,71 @@ const AgentStudio = () => { Бриф → AI → сохранение в CRM - + -
+
+
+

Быстрый выбор шаблонов

+

Не нужно искать нужный блок ниже — выберите тип сценария одной кнопкой.

+
+ +
+ {TEMPLATE_SECTION_OPTIONS.map((section) => { + const isActive = activeTemplateSection === section.value; + const isLeadSection = section.value === 'lead_reply'; + + return ( + + ); + })} +
+
+ + {activeTemplateSection === 'content' ? ( +

Контент-шаблоны

@@ -1555,9 +1640,11 @@ const AgentStudio = () => { ); })}
-
+
+ ) : null} -
+ {activeTemplateSection === 'lead_reply' ? ( +

Lead-шаблоны

@@ -1635,6 +1722,7 @@ const AgentStudio = () => { })}
+ ) : null}