Skip to content
Merged
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
10 changes: 5 additions & 5 deletions apps/web/src/components/ComposerPromptEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ import { cn, isMacPlatform } from "~/lib/utils";
import { basenameOfPath } from "~/pierre-icons";
import {
COMPOSER_INLINE_CHIP_ICON_CLASS_NAME,
COMPOSER_INLINE_CHIP_LABEL_CLASS_NAME,
COMPOSER_INLINE_SKILL_CHIP_CLASS_NAME,
COMPOSER_INLINE_SKILL_CHIP_LABEL_CLASS_NAME,
SKILL_CHIP_ICON_SVG,
} from "./composerInlineChip";
import { FILE_TAG_CHIP_CLASS_NAME, FileTagChipContent } from "./chat/FileTagChip";
Expand Down Expand Up @@ -188,7 +188,7 @@ class ComposerMentionNode extends DecoratorNode<React.ReactElement> {

override createDOM(): HTMLElement {
const dom = document.createElement("span");
dom.className = "composer-inline-chip relative inline-flex align-middle leading-none";
dom.className = "composer-inline-chip relative inline-flex align-[-0.125em] leading-none";
return dom;
}

Expand Down Expand Up @@ -256,7 +256,7 @@ function ComposerSkillDecorator(props: { skillLabel: string; skillDescription: s
className={COMPOSER_INLINE_CHIP_ICON_CLASS_NAME}
dangerouslySetInnerHTML={{ __html: SKILL_CHIP_ICON_SVG }}
/>
<span className={COMPOSER_INLINE_CHIP_LABEL_CLASS_NAME}>{props.skillLabel}</span>
<span className={COMPOSER_INLINE_SKILL_CHIP_LABEL_CLASS_NAME}>{props.skillLabel}</span>
</span>
);

Expand Down Expand Up @@ -326,7 +326,7 @@ class ComposerSkillNode extends DecoratorNode<React.ReactElement> {

override createDOM(): HTMLElement {
const dom = document.createElement("span");
dom.className = "composer-inline-chip relative inline-flex align-middle leading-none";
dom.className = "composer-inline-chip relative inline-flex align-[-0.125em] leading-none";
return dom;
}

Expand Down Expand Up @@ -397,7 +397,7 @@ class ComposerTerminalContextNode extends DecoratorNode<React.ReactElement> {

override createDOM(): HTMLElement {
const dom = document.createElement("span");
dom.className = "composer-inline-chip relative inline-flex align-middle leading-none";
dom.className = "composer-inline-chip relative inline-flex align-[-0.125em] leading-none";
return dom;
}

Expand Down
4 changes: 4 additions & 0 deletions apps/web/src/components/composerInlineChip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export const CHAT_INLINE_CHIP_LABEL_CLASS_NAME = "truncate leading-tight";

export const COMPOSER_INLINE_CHIP_LABEL_CLASS_NAME = `${CHAT_INLINE_CHIP_LABEL_CLASS_NAME} select-none`;

// The skill label is smaller than the surrounding prompt text; offset its
// glyphs without moving the pill box or changing the editor's line height.
export const COMPOSER_INLINE_SKILL_CHIP_LABEL_CLASS_NAME = `${COMPOSER_INLINE_CHIP_LABEL_CLASS_NAME} relative top-[0.15em]`;

export const COMPOSER_INLINE_SKILL_CHIP_CLASS_NAME =
"inline-flex max-w-full select-none items-center gap-[0.33em] rounded-[0.5em] border border-fuchsia-500/25 bg-fuchsia-500/12 px-[0.5em] py-[0.08em] font-medium text-[0.86em] leading-[1.1] text-fuchsia-700 align-middle dark:text-fuchsia-300";

Expand Down
Loading