+ {toolLoading && (
+
+ )}
+
+ {!toolLoading && toolResult?.error && (
+ {toolResult.error}
+ )}
+
+ {!toolLoading && activeTool === 'optimize' && toolResult?.optimized_content && (
+
+ {toolResult?.diff_summary && (
+
{toolResult.diff_summary}
+ )}
+ {Array.isArray(toolResult?.changes_made) && toolResult.changes_made.length > 0 && (
+
+ {toolResult.changes_made.map((c: string, idx: number) => (
+
+
+
+ ))}
+
+ )}
+
+
+ )}
+
+ {!toolLoading && activeTool === 'links' && (
+
+ {Array.isArray(toolResult?.suggestions) && toolResult.suggestions.length > 0 ? (
+
+ {toolResult.suggestions.map((s: any, idx: number) => (
+ insertLinkSuggestion(s.url)}>Insert
+ }>
+
+
+ ))}
+
+ ) : (
+
No suggestions yet. Make sure SIF index has your website content.
+ )}
+
+ )}
+
+ {!toolLoading && activeTool === 'originality' && (
+
+ {toolResult?.cannibalization && (
+
{JSON.stringify(toolResult.cannibalization, null, 2)}
+ )}
+ {Array.isArray(toolResult?.matches) && toolResult.matches.length > 0 ? (
+
+ {toolResult.matches.map((m: any, idx: number) => (
+
+
+
+ ))}
+
+ ) : (
+
No close matches found.
+ )}
+
+ )}
+
+ {!toolLoading && activeTool === 'fact' && (
+
+ {toolResult?.verification && (
+
{JSON.stringify(toolResult.verification, null, 2)}
+ )}
+ {Array.isArray(toolResult?.citations) && toolResult.citations.length > 0 && (
+
+ {toolResult.citations.map((c: any, idx: number) => (
+
+
+
+ ))}
+
+ )}
+
+ )}
+
+ {!toolLoading && activeTool === 'flow' && (
+ {JSON.stringify(toolResult, null, 2)}
+ )}
+
+