Recovered state: integrated TrendSurferAgent, restored frontend/backend files, and cleaned up recovery scripts
This commit is contained in:
@@ -12,6 +12,7 @@ interface ContentPreviewHeaderProps {
|
||||
assistantOn?: boolean;
|
||||
onAssistantToggle?: (enabled: boolean) => void;
|
||||
topic?: string;
|
||||
platform?: string;
|
||||
}
|
||||
|
||||
// Main ContentPreviewHeader component - now just a wrapper that uses the extracted component
|
||||
|
||||
@@ -12,6 +12,7 @@ interface ContentPreviewHeaderProps {
|
||||
assistantOn?: boolean;
|
||||
onAssistantToggle?: (enabled: boolean) => void;
|
||||
topic?: string;
|
||||
platform?: string;
|
||||
}
|
||||
|
||||
// Research Sources Modal Component
|
||||
|
||||
@@ -22,6 +22,7 @@ interface MainContentPreviewHeaderProps {
|
||||
assistantOn?: boolean;
|
||||
onAssistantToggle?: (enabled: boolean) => void;
|
||||
topic?: string;
|
||||
platform?: string;
|
||||
}
|
||||
|
||||
const MainContentPreviewHeader: React.FC<MainContentPreviewHeaderProps> = ({
|
||||
@@ -34,7 +35,8 @@ const MainContentPreviewHeader: React.FC<MainContentPreviewHeaderProps> = ({
|
||||
onPreviewToggle,
|
||||
assistantOn,
|
||||
onAssistantToggle,
|
||||
topic
|
||||
topic,
|
||||
platform = 'linkedin'
|
||||
}) => {
|
||||
const getChipColor = (v?: number) => {
|
||||
if (typeof v !== 'number') return '#6b7280';
|
||||
@@ -69,6 +71,8 @@ const MainContentPreviewHeader: React.FC<MainContentPreviewHeaderProps> = ({
|
||||
Coverage: 'Citation Coverage indicates how much of the content is supported with citations. Higher is better.'
|
||||
};
|
||||
|
||||
const displayPlatform = platform.charAt(0).toUpperCase() + platform.slice(1);
|
||||
|
||||
return (
|
||||
<div style={{
|
||||
padding: '12px 16px',
|
||||
@@ -82,11 +86,11 @@ const MainContentPreviewHeader: React.FC<MainContentPreviewHeaderProps> = ({
|
||||
justifyContent: 'space-between'
|
||||
}}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: '16px' }}>
|
||||
<span>{topic ? `${topic} - LinkedIn Content Preview` : 'LinkedIn Content Preview'}</span>
|
||||
<span>{topic ? `${topic} - ${displayPlatform} Content Preview` : `${displayPlatform} Content Preview`}</span>
|
||||
|
||||
{/* Persona Chip */}
|
||||
<PersonaChip
|
||||
platform="linkedin"
|
||||
platform={platform}
|
||||
onPersonaUpdate={(personaData) => {
|
||||
console.log('Persona updated:', personaData);
|
||||
// You can add additional logic here to handle persona updates
|
||||
|
||||
@@ -295,7 +295,7 @@ const PersonaChip: React.FC<PersonaChipProps> = ({
|
||||
boxShadow: '0 0 6px rgba(255, 255, 255, 0.5)'
|
||||
}} />
|
||||
<span style={{ whiteSpace: 'nowrap' }}>
|
||||
{personaData.persona_name || 'Untitled Persona'}
|
||||
{personaData.persona_name || 'Untitled Brand Voice'}
|
||||
</span>
|
||||
<div style={{
|
||||
fontSize: '10px',
|
||||
|
||||
@@ -44,7 +44,7 @@ const PersonaEditorModal: React.FC<PersonaEditorModalProps> = ({
|
||||
platform
|
||||
}) => {
|
||||
const [editedData, setEditedData] = useState<PersonaData | null>(null);
|
||||
const [activeTab, setActiveTab] = useState<'core' | 'linguistic' | 'platform' | 'optimization'>('core');
|
||||
const [activeTab, setActiveTab] = useState<'core' | 'style' | 'platforms' | 'strategy'>('core');
|
||||
const [saveToDatabase, setSaveToDatabase] = useState(true);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -93,12 +93,12 @@ const PersonaEditorModal: React.FC<PersonaEditorModalProps> = ({
|
||||
return current || defaultValue;
|
||||
};
|
||||
|
||||
const tabs = [
|
||||
{ id: 'core', label: 'Core Identity', icon: '🎭' },
|
||||
{ id: 'linguistic', label: 'Linguistic', icon: '📝' },
|
||||
{ id: 'platform', label: 'Platform', icon: '🔗' },
|
||||
{ id: 'optimization', label: 'Optimization', icon: '⚡' }
|
||||
] as const;
|
||||
const tabs: { id: 'core' | 'style' | 'platforms' | 'strategy'; label: string; icon: string }[] = [
|
||||
{ id: 'core', label: 'Brand Identity', icon: '🎭' },
|
||||
{ id: 'style', label: 'Linguistic Fingerprint', icon: '✍️' },
|
||||
{ id: 'platforms', label: 'Platform Adaptations', icon: '📱' },
|
||||
{ id: 'strategy', label: 'Content Strategy', icon: '🎯' }
|
||||
];
|
||||
|
||||
return (
|
||||
<div style={{
|
||||
@@ -135,7 +135,7 @@ const PersonaEditorModal: React.FC<PersonaEditorModalProps> = ({
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '16px' }}>
|
||||
<div>
|
||||
<h2 style={{ margin: 0, fontSize: '24px', fontWeight: '700' }}>
|
||||
Edit Persona: {getFieldValue('persona_name', 'Untitled Persona')}
|
||||
Edit Brand Voice: {getFieldValue('persona_name', 'Untitled Brand Voice')}
|
||||
</h2>
|
||||
<p style={{ margin: '4px 0 0 0', fontSize: '14px', opacity: 0.9 }}>
|
||||
Platform: {platform} • Confidence: {(() => {
|
||||
@@ -345,7 +345,7 @@ const PersonaEditorModal: React.FC<PersonaEditorModalProps> = ({
|
||||
</div>
|
||||
)}
|
||||
|
||||
{activeTab === 'linguistic' && (
|
||||
{activeTab === 'style' && (
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: '20px' }}>
|
||||
<div>
|
||||
<h3 style={{ margin: '0 0 16px 0', fontSize: '18px', fontWeight: '600', color: '#374151' }}>
|
||||
@@ -501,7 +501,7 @@ const PersonaEditorModal: React.FC<PersonaEditorModalProps> = ({
|
||||
</div>
|
||||
)}
|
||||
|
||||
{activeTab === 'platform' && (
|
||||
{activeTab === 'platforms' && (
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: '20px' }}>
|
||||
<div>
|
||||
<h3 style={{ margin: '0 0 16px 0', fontSize: '18px', fontWeight: '600', color: '#374151' }}>
|
||||
@@ -650,7 +650,7 @@ const PersonaEditorModal: React.FC<PersonaEditorModalProps> = ({
|
||||
</div>
|
||||
)}
|
||||
|
||||
{activeTab === 'optimization' && (
|
||||
{activeTab === 'strategy' && (
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: '20px' }}>
|
||||
<div>
|
||||
<h3 style={{ margin: '0 0 16px 0', fontSize: '18px', fontWeight: '600', color: '#374151' }}>
|
||||
|
||||
Reference in New Issue
Block a user