// src/components/SuggestionsPanel.js import React from 'react'; import { useAppConfig } from '../contexts/AppConfigContext'; /** Render yaml titles; optional `**text**` still strips markdown. CSS makes titles bold, not italic. */ export function FormattedTitle({ title }) { const nodes = []; const re = /\*\*([^*]+)\*\*/g; let last = 0; let match; let key = 0; const text = title || ''; while ((match = re.exec(text)) !== null) { if (match.index > last) { nodes.push(text.slice(last, match.index)); } nodes.push({match[1]}); last = match.index + match[0].length; } if (last < text.length) { nodes.push(text.slice(last)); } return <>{nodes}; } const SuggestionsPanel = ({ onSuggestionClick }) => { const { config, resolveIcon } = useAppConfig(); const examples = config?.chat_page?.examples || []; return (

Getting Started

Choose a topic to get advice from all personas

{examples.map((category, categoryIndex) => { const Icon = resolveIcon(category.icon); return (

{(category.suggestions || []).map((suggestion, suggestionIndex) => ( ))}
); })}
); }; export default SuggestionsPanel;