feat: chat agent can find and show existing product renders
Added find_product_renders tool to the AI agent: - Searches completed renders by product name/ID - Returns viewable image URLs (relative paths) - Supports transparent_only filter - AI formats results as Markdown images/links in chat Frontend: - ChatPanel ReactMarkdown renders <img> and <a> tags - Images shown inline (max 200px height, rounded, bordered) - Links open in new tab with accent color System prompt updated to instruct AI to use Markdown image syntax when showing renders:  Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -240,6 +240,8 @@ export default function ChatPanel({ open, onClose, contextType, contextId }: Cha
|
||||
ol: ({ children }) => <ol className="list-decimal list-inside mb-1 space-y-0.5">{children}</ol>,
|
||||
li: ({ children }) => <li>{children}</li>,
|
||||
code: ({ children }) => <code className="px-1 py-0.5 rounded text-xs font-mono" style={{ backgroundColor: 'var(--color-bg-muted)' }}>{children}</code>,
|
||||
a: ({ href, children }) => <a href={href} target="_blank" rel="noopener noreferrer" className="text-accent underline hover:text-accent-hover">{children}</a>,
|
||||
img: ({ src, alt }) => <img src={src} alt={alt || 'render'} className="max-w-full rounded-lg mt-1 mb-1 border border-border-default" style={{ maxHeight: '200px' }} />,
|
||||
}}
|
||||
>
|
||||
{msg.content}
|
||||
|
||||
Reference in New Issue
Block a user