fix: improve memory markdown layout
This commit is contained in:
@@ -58,24 +58,36 @@ export function MultiselectWidget({ descriptor, onRespond }: WidgetProps) {
|
||||
checked={checked.has(o.id)}
|
||||
onChange={() => toggle(o.id)}
|
||||
/>
|
||||
<span className="min-w-0 flex-1">
|
||||
<span className="block font-medium">{o.label}</span>
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="font-medium leading-snug">{o.label}</div>
|
||||
{o.detail && (
|
||||
<div className="thot-prose mt-1 text-sm text-muted-foreground">
|
||||
<div className="thot-prose mt-2 text-sm leading-relaxed text-muted-foreground">
|
||||
<ReactMarkdown remarkPlugins={[remarkGfm]}>{o.detail}</ReactMarkdown>
|
||||
</div>
|
||||
)}
|
||||
{o.rationale && (
|
||||
<span className="mt-1 block text-xs text-foreground/80">
|
||||
Motivo: {o.rationale}
|
||||
</span>
|
||||
<div className="mt-3 border-l-2 border-border/70 pl-3 text-xs text-foreground/80">
|
||||
<div className="mb-1 font-semibold uppercase tracking-wide text-muted-foreground">
|
||||
Motivo
|
||||
</div>
|
||||
<div className="thot-prose leading-relaxed [&>p:first-child]:mt-0 [&>p:last-child]:mb-0">
|
||||
<ReactMarkdown remarkPlugins={[remarkGfm]}>{o.rationale}</ReactMarkdown>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{typeof o.meta?.question_context === "string" && o.meta.question_context && (
|
||||
<span className="mt-1 block text-xs text-muted-foreground">
|
||||
Domanda di contesto: {o.meta.question_context}
|
||||
</span>
|
||||
<div className="mt-3 border-l-2 border-border/50 pl-3 text-xs text-muted-foreground">
|
||||
<div className="mb-1 font-semibold uppercase tracking-wide">
|
||||
Domanda di contesto
|
||||
</div>
|
||||
<div className="thot-prose leading-relaxed [&>p:first-child]:mt-0 [&>p:last-child]:mb-0">
|
||||
<ReactMarkdown remarkPlugins={[remarkGfm]}>
|
||||
{o.meta.question_context}
|
||||
</ReactMarkdown>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
</label>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user