// Icons + small shared UI primitives.
const Icon = ({ name, size = 16, ...rest }) => {
const s = { width: size, height: size, ...(rest.style || {}) };
const common = { width: size, height: size, viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: 1.7, strokeLinecap: 'round', strokeLinejoin: 'round', ...rest, style: s };
const paths = {
sidebar: <>>,
plus: <>>,
search: <>>,
send: <>>,
settings: <>>,
bookmark: <>>,
schedule: <>>,
upload: <>>,
download: <>>,
copy: <>>,
thumb_up: <>>,
thumb_dn: <>>,
chevron_r: <>>,
chevron_d: <>>,
x: <>>,
sparkle: <>>,
check: <>>,
info: <>>,
warning: <>>,
dax: <>>,
table: <>>,
chart: <>>,
pin: <>>,
file: <>>,
globe: <>>,
mic: <>>,
paperclip: <>>,
layers: <>>,
history: <>>,
branches: <>>,
flask: <>>,
deck: <>>,
};
return ;
};
const AgentChip = ({ agent, withReason, reason }) => {
const A = window.OMNI_DATA.AGENTS.find(a => a.id === agent);
if (!A) return null;
return (
{A.icon}
{A.name}
{withReason && reason && (
<>
› {reason}
>
)}
);
};
const fmtMoney = (n) => '$' + n.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 });
const fmtInt = (n) => n.toLocaleString('en-US');
Object.assign(window, { Icon, AgentChip, fmtMoney, fmtInt });