Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions apps/web/src/components/ContextChip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type * as React from "react";
import { cn } from "~/lib/utils";

const contextChipVariants = cva(
"inline-flex max-w-full items-center gap-[0.2em] font-medium leading-[normal] text-(--context-chip-ink) [--context-chip-ink:var(--context-chip-accent)] [--document-icon-stroke:var(--context-chip-ink)] [&_svg]:block [&_svg]:size-[1em] [&_svg]:shrink-0 [&_svg]:self-center [button&,a&,[data-popup-open]&]:cursor-pointer focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-current rounded-sm disabled:cursor-default",
"inline-flex max-w-full items-center gap-[0.2em] font-medium leading-[normal] text-(--context-chip-ink) [--context-chip-ink:var(--context-chip-message-ink,var(--context-chip-accent))] [--document-icon-stroke:var(--context-chip-ink)] [&_svg]:block [&_svg]:size-[1em] [&_svg]:shrink-0 [&_svg]:self-center [button&,a&,[data-popup-open]&]:cursor-pointer focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-current rounded-sm disabled:cursor-default",
{
defaultVariants: { kind: "neutral" },
variants: {
Expand All @@ -30,7 +30,9 @@ const contextChipVariants = cva(
thread: "[--context-chip-accent:var(--context-chip-thread)]",
environment: "[--context-chip-accent:var(--context-chip-environment)]",
citation: "[--context-chip-accent:var(--context-chip-citation)]",
"doc-pdf": "[--context-chip-accent:var(--context-chip-doc-pdf)]",
// PDF red reads as the invalid state, so only the icon carries it.
"doc-pdf":
"[--context-chip-accent:var(--context-chip-doc-pdf)] [--context-chip-ink:var(--context-chip-message-ink,currentColor)] [--document-icon-stroke:var(--context-chip-message-ink,var(--context-chip-accent))]",
"doc-word": "[--context-chip-accent:var(--context-chip-doc-word)]",
"doc-spreadsheet": "[--context-chip-accent:var(--context-chip-doc-spreadsheet)]",
"doc-slides": "[--context-chip-accent:var(--context-chip-doc-slides)]",
Expand All @@ -43,7 +45,7 @@ const contextChipVariants = cva(
state: {
unresolved: "data-[state=unresolved]:[--context-chip-accent:currentColor]",
invalid:
"data-[state=invalid]:[--context-chip-accent:var(--context-chip-invalid,var(--destructive-foreground))]",
"data-[state=invalid]:[--context-chip-accent:var(--context-chip-invalid,var(--destructive-foreground))] data-[state=invalid]:[--context-chip-ink:var(--context-chip-message-ink,var(--context-chip-accent))]",
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/chat/TimelineUserMessageRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const MEDIA_EDGE_CLASS_NAME =
"relative after:pointer-events-none after:absolute after:inset-0 after:z-10 after:rounded-[inherit] after:ring-1 after:ring-inset after:ring-black/9 dark:after:ring-white/12";

const BUBBLE_CHIP_CLASS_NAME =
"[&_[data-slot=context-chip]]:[--context-chip-ink:var(--context-chip-message,var(--context-chip-accent))]";
"[&_[data-slot=context-chip]]:[--context-chip-message-ink:var(--context-chip-message)]";

function UserFileCard({
file,
Expand Down
Loading