chore: uptick

This commit is contained in:
Brooklyn Nicholson
2026-05-01 19:53:41 -05:00
parent d5d7b5c6dc
commit e00297782d
19 changed files with 782 additions and 153 deletions
@@ -84,6 +84,31 @@ export function formatRefValue(value: string): string {
export const hermesDirectiveFormatter: Unstable_DirectiveFormatter = {
serialize(item: Unstable_TriggerItem): string {
const metadata = item.metadata as { rawText?: unknown; insertId?: unknown } | undefined
const rawText = typeof metadata?.rawText === 'string' ? metadata.rawText : null
const insertId = typeof metadata?.insertId === 'string' ? metadata.insertId : null
// Live-completion items carry the gateway's original `text` field via metadata.
if (rawText) {
// Palette starters (`@file:` with empty value) — insert verbatim so the
// user can keep typing the path inline.
if (rawText.endsWith(':') && !insertId) {
return rawText
}
// Simple references like `@diff` / `@staged`.
if (!insertId) {
return rawText
}
// Typed references with a value — quote when needed.
const kindMatch = rawText.match(/^@([^:]+):/)
const kind = kindMatch?.[1] ?? item.type
return `@${kind}:${formatRefValue(insertId)}`
}
// Fallback for legacy callers that pass raw `id` strings.
if (item.id === `${item.type}:`) {
return `@${item.id}`
}
@@ -64,7 +64,7 @@ export function NotificationStack() {
return (
<div
aria-label="Notifications"
className="pointer-events-none fixed left-1/2 top-[calc(var(--titlebar-height)+0.75rem)] z-1050 flex w-[min(32rem,calc(100vw-2rem))] -translate-x-1/2 flex-col gap-2"
className="pointer-events-none absolute left-1/2 top-[calc(var(--titlebar-height)+0.75rem)] z-1050 flex w-[min(32rem,calc(100%-2rem))] -translate-x-1/2 flex-col gap-2"
role="region"
>
<NotificationItem notification={latest} />