mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-21 22:46:32 +00:00
3c3a228737
- agent loop and decisions without await in loops: steps as recursion, calls and applied changes in order through one promise chain, the independent reads and claims in parallel; part mapping in its own helpers - place card, header and weather strip without refs or components created in render; long hooks and components split; state reset during render - trip notes only in a turn's tool session, never an undo's; map view reported only while the assistant can run - place strip scrolls through the strip's own smooth scroll, no physical side - tests follow the raised limits and the new card fields; toasts read through a mocked useToast instead of a window global; baselines lowered where the counts fell
21 lines
787 B
TypeScript
21 lines
787 B
TypeScript
/**
|
|
* A keyboard shortcut as the keys to press, one quiet chip per key: ["⌘", "K"]
|
|
* reads as two keys, not as the text "⌘K". The chips take the colour of the
|
|
* text around them, so the same shortcut sits in a tooltip, a menu row or a
|
|
* button without a palette of its own.
|
|
*/
|
|
export default function Kbd({ keys, className = '' }: { keys: readonly string[]; className?: string }) {
|
|
return (
|
|
<kbd className={`inline-flex items-center gap-0.5 font-[inherit] ${className}`}>
|
|
{keys.map((key, i) => (
|
|
<span
|
|
key={`${key}-${i}`}
|
|
className="inline-flex min-w-[1.5em] items-center justify-center rounded border border-edge-secondary px-1 text-caption leading-[1.5] opacity-80"
|
|
>
|
|
{key}
|
|
</span>
|
|
))}
|
|
</kbd>
|
|
);
|
|
}
|