mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-18 19:50:38 +09:00
Address Greptile review on UI polish PR
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
c3f4e18a5e
commit
6960ab1106
3 changed files with 51 additions and 19 deletions
|
|
@ -112,15 +112,11 @@ function buildAgentIconMask(iconName: string | null): string | null {
|
|||
if (cached) return cached;
|
||||
|
||||
const Icon = getAgentIcon(iconName);
|
||||
const rendered = (
|
||||
const iconNode = (
|
||||
Icon as unknown as {
|
||||
render: (
|
||||
props: Record<string, unknown>,
|
||||
ref: unknown,
|
||||
) => { props?: { iconNode?: Array<[string, Record<string, string>]> } };
|
||||
iconNode?: Array<[string, Record<string, string>]>;
|
||||
}
|
||||
).render({ size: 12, strokeWidth: 2 }, null);
|
||||
const iconNode = rendered?.props?.iconNode;
|
||||
).iconNode;
|
||||
if (!Array.isArray(iconNode) || iconNode.length === 0) return null;
|
||||
|
||||
const body = iconNode.map(([tag, attrs]) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue