Files
hermes-agent/apps/desktop/src/components/chat/widget-shell.ts
T
Brooklyn Nicholson 148cb80771 feat(desktop): one shell for the transcript's inline widgets
Clarify and the artifact card were the only two tool results that render
as a panel, and neither looked like the other: clarify sat on a 2px
radius over the chat backdrop's own color, so the card was invisible
except for its hairline; the artifact card used a hardcoded 10px radius
and no fill at all.

Both now wear WIDGET_SHELL_CLASS -- one radius a rung above the
composer, one fill, no border. --ui-widget-surface-background is the
card token in light mode and a touch below it in dark, where a raw card
fill sits above the chrome and reads as a lit panel. It derives from
--ui-bg-editor so a skin's own card seed carries through.
2026-07-30 04:47:28 -05:00

13 lines
672 B
TypeScript

/**
* Inline transcript widgets — the few tool results that render as a panel the
* user reads or acts on (a clarify question, an artifact card) rather than as
* a scaffold line.
*
* They share one shell so they cannot drift apart. They used to each pick their
* own: clarify sat on a 2px radius over the chat backdrop's own color (a card
* you could only see by its hairline), the artifact card on a hardcoded 10px
* over nothing. One radius one rung above the composer, one mode-derived fill,
* no border — the surface reads as a surface on the fill alone.
*/
export const WIDGET_SHELL_CLASS = 'rounded-3xl bg-(--ui-widget-surface-background) px-3.5 py-3'