fix(webui): align chat links with edit filename colors (#6484)

This commit is contained in:
chengyongru authored and GitHub committed 2026-10-27 13:05:32 +08:00
1 parent 960bfa9a83
commit 164ddadd8e
10 files changed
+24 -10

No files matched your search

+2 -2
View File
@@ -100,7 +100,7 @@ export function FileReferenceChip({
"inline-flex max-w-full items-baseline gap-[0.28em] font-medium leading-[inherit]",
truncateFromStart && "min-w-0",
interactive
? "text-sky-600 transition-colors hover:text-sky-700 dark:text-sky-300 dark:hover:text-sky-200"
? "text-content-link transition-colors hover:text-content-link-hover"
: "text-muted-foreground",
interactive && [
"cursor-pointer rounded-compact",
@@ -121,7 +121,7 @@ export function FileReferenceChip({
{display === "path" && directory ? (
<>
<span className="text-muted-foreground">{directory}</span>
<span className={cn("font-semibold", interactive && "text-sky-700 dark:text-sky-200")}>{name}</span>
<span className="font-semibold">{name}</span>
</>
) : (
displayText
@@ -359,7 +359,7 @@ function DocumentLink({ href, path, onOpen, children }: {
// Fragment-only links must not replace the application's hash route.
if (!href || href.startsWith("#")) return <>{children}</>;
if (/^(https?:\/\/|mailto:)/i.test(href)) {
return <WebLink href={href} className="text-blue-500 underline underline-offset-2 dark:text-blue-300">{children}</WebLink>;
return <WebLink href={href} className="text-content-link underline underline-offset-2">{children}</WebLink>;
}
if (/^[a-z][a-z\d+.-]*:/i.test(href) || href.startsWith("//")) return <>{children}</>;
let target = href.split(/[?#]/, 1)[0];
@@ -465,7 +465,7 @@ function InlineLinkPreviewRow({ link }: { link: InlineLinkPreview }) {
aria-label={t("message.openLink", { label })}
className={cn(
"not-prose inline-flex max-w-full items-center gap-2 align-baseline",
"text-blue-500 no-underline underline-offset-2 hover:underline dark:text-blue-300",
"text-content-link no-underline underline-offset-2 hover:underline",
)}
>
<span
@@ -659,7 +659,7 @@ export default function MarkdownTextRenderer({
href={href}
target="_blank"
rel="noreferrer noopener"
className="text-blue-500 underline underline-offset-2 hover:text-blue-600 dark:text-blue-300 dark:hover:text-blue-200"
className="text-content-link underline underline-offset-2 hover:text-content-link-hover"
{...props}
>
{markdownChildren}
@@ -841,7 +841,7 @@ export default function MarkdownTextRenderer({
"prose-ul:my-2 prose-ol:my-2 prose-li:my-0.5",
"prose-blockquote:my-3 prose-blockquote:border-l-2 prose-blockquote:font-normal",
"prose-blockquote:not-italic prose-blockquote:text-foreground/80",
"prose-a:text-blue-500 prose-a:underline-offset-2 hover:prose-a:text-blue-600 dark:prose-a:text-blue-300 dark:hover:prose-a:text-blue-200",
"prose-a:text-content-link prose-a:underline-offset-2 hover:prose-a:text-content-link-hover",
"prose-hr:my-6",
"prose-pre:my-0 prose-pre:bg-transparent prose-pre:p-0",
"prose-code:before:content-none prose-code:after:content-none prose-code:font-normal",
@@ -33,11 +33,11 @@ export function WebActivityRow({
target="_blank"
rel="noreferrer noopener"
aria-label={`${title}, ${displayUrl}`}
className="flex min-w-0 items-center gap-2 overflow-hidden text-foreground/82 hover:text-foreground"
className="flex min-w-0 items-center gap-2 overflow-hidden text-content-link hover:text-content-link-hover"
>
<span className="min-w-0 truncate font-medium">{title}</span>
<span
className="max-w-[9rem] shrink truncate rounded-full bg-muted/65 px-2 py-0.5 font-mono text-[10px] leading-4 text-muted-foreground/72 sm:max-w-[18rem]"
className="max-w-[9rem] shrink truncate rounded-full bg-muted/65 px-2 py-0.5 font-mono text-[10px] leading-4 text-muted-foreground sm:max-w-[18rem]"
data-testid="activity-web-url"
>
{displayUrl}