mirror of
https://github.com/supabase/supabase.git
synced 2026-06-13 01:39:53 +08:00
Re-adds support form Assistant response using a lighter weight Streamdown component vs the more heavy `Message` component. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * AI Assistant follow-up card after ticket submission for project-scoped requests. * In-chat support request preview panels showing submitted subject and message. * **Improvements** * Smarter project selection when opening the support form via route/context. * Success screen: cleaner layout, project-name messaging, optional finish action, and a "Join Discord" button. * Category prompt text updated to "What issue are you having?" * New success/feedback section for consistent layouts. * **Tests** * Added tests covering support prompt serialization/parsing and UI previews. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46248?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
45 lines
1.5 KiB
TypeScript
45 lines
1.5 KiB
TypeScript
import { Mail } from 'lucide-react'
|
|
|
|
import {
|
|
parseSupportAssistantPrompt,
|
|
type ParsedSupportAssistantPrompt,
|
|
} from '@/components/interfaces/Support/SupportAssistant.utils'
|
|
|
|
export function parseSupportRequestMessage(text: string) {
|
|
return parseSupportAssistantPrompt(text)
|
|
}
|
|
|
|
export function SupportRequestMessage({ request }: { request: ParsedSupportAssistantPrompt }) {
|
|
return (
|
|
<div className="not-prose rounded-lg border bg-surface-75 p-4 text-sm text-foreground-light">
|
|
<div className="min-w-0 space-y-4">
|
|
<div className="space-y-4">
|
|
<Mail size={16} strokeWidth={1.5} className="text-foreground-muted" />
|
|
<div className="space-y-1">
|
|
<p className="heading-default text-foreground">Support request submitted</p>
|
|
<p>
|
|
Supabase Support already has this ticket. Assistant is reviewing the same request to
|
|
help in the interim.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
{request.subject && (
|
|
<div>
|
|
<p className="heading-meta text-foreground-light">Subject</p>
|
|
<p className="text-foreground">{request.subject}</p>
|
|
</div>
|
|
)}
|
|
{request.message && (
|
|
<div>
|
|
<p className="heading-meta text-foreground-light">Message</p>
|
|
<p className="line-clamp-6 whitespace-pre-wrap break-words text-foreground">
|
|
{request.message}
|
|
</p>
|
|
</div>
|
|
)}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|