mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-22 22:42:25 +00:00
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com> fixing package.json Signed-off-by: Francisco Javier Arceo <farceo@redhat.com> moving ui -> chat Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
28 lines
750 B
TypeScript
28 lines
750 B
TypeScript
interface PromptSuggestionsProps {
|
|
label: string
|
|
append: (message: { role: "user"; content: string }) => void
|
|
suggestions: string[]
|
|
}
|
|
|
|
export function PromptSuggestions({
|
|
label,
|
|
append,
|
|
suggestions,
|
|
}: PromptSuggestionsProps) {
|
|
return (
|
|
<div className="space-y-6">
|
|
<h2 className="text-center text-2xl font-bold">{label}</h2>
|
|
<div className="flex gap-6 text-sm">
|
|
{suggestions.map((suggestion) => (
|
|
<button
|
|
key={suggestion}
|
|
onClick={() => append({ role: "user", content: suggestion })}
|
|
className="h-max flex-1 rounded-xl border bg-background p-4 hover:bg-muted"
|
|
>
|
|
<p>{suggestion}</p>
|
|
</button>
|
|
))}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|