refactor(webui): use native link actions and remove website previews (#6391)
* refactor(webui): remove website previews and custom link menus * docs(webui): focus guide on product-specific usage
This commit is contained in:
1 parent
bc5c58d239
commit
08ca3b4525
42 files changed
+179
-1493
No files matched your search
@@ -7,7 +7,7 @@ import {
|
||||
useState,
|
||||
type ReactNode,
|
||||
} from "react";
|
||||
import { Activity, Check, ChevronRight, CircleAlert, Clock3, Copy, Link2, Quote, Wrench } from "lucide-react";
|
||||
import { Activity, Check, ChevronRight, CircleAlert, Clock3, Copy, Quote, Wrench } from "lucide-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { DisclosureContent } from "@/components/ui/disclosure";
|
||||
|
||||
@@ -145,7 +145,6 @@ interface MessageBlockMenuActionsProps {
|
||||
isTurnStreaming?: boolean;
|
||||
onForkFromHere?: () => void;
|
||||
activity?: MessageBlockMenuActivity;
|
||||
onViewLinks?: () => void;
|
||||
sheet?: boolean;
|
||||
}
|
||||
|
||||
@@ -155,7 +154,6 @@ export function MessageBlockMenuActions({
|
||||
isTurnStreaming = false,
|
||||
onForkFromHere,
|
||||
activity,
|
||||
onViewLinks,
|
||||
sheet = false,
|
||||
}: MessageBlockMenuActionsProps) {
|
||||
const { t } = useTranslation();
|
||||
@@ -248,10 +246,6 @@ export function MessageBlockMenuActions({
|
||||
) : null}
|
||||
</div>
|
||||
) : null}
|
||||
{onViewLinks ? <button type="button" data-message-links-trigger onClick={onViewLinks}
|
||||
className="flex min-h-[var(--message-block-control-size)] w-full items-center gap-2 rounded-control px-2 py-1.5 text-[13px] text-muted-foreground hover:bg-muted/70 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">
|
||||
<Link2 className="h-3.5 w-3.5" aria-hidden />{t("webPreview.viewLinks")}
|
||||
</button> : null}
|
||||
<FallbackResponseSources
|
||||
sources={message.role === "assistant" ? message.responseSources : undefined}
|
||||
className="min-h-[var(--message-block-control-size)] gap-1"
|
||||
|
||||
Reference in new issue
Block a user