fix: tool approval select z-index and syntax highlight colors

- SelectContent z-[60] to render above the z-[55] approval sheet
- Move fallback text color to parent div so hljs class colors take priority
  (inline style on each line was overriding .hljs-attr/.hljs-string classes)
This commit is contained in:
iliya 2026-03-21 12:12:04 +02:00
parent a6fc7f82d3
commit 6d77e77200
2 changed files with 2 additions and 2 deletions

View file

@ -332,6 +332,7 @@ const ToolInputPreview = ({
style={{
backgroundColor: 'var(--color-surface)',
borderColor: 'var(--color-border)',
color: 'var(--color-text-secondary)',
}}
>
{/* highlightLines uses hljs which HTML-escapes all input text, producing only <span class="hljs-*"> tags.
@ -341,7 +342,6 @@ const ToolInputPreview = ({
<div
key={i}
className="whitespace-pre-wrap break-all"
style={{ color: 'var(--color-text-secondary)' }}
dangerouslySetInnerHTML={{ __html: html || '&nbsp;' }}
/>
))}

View file

@ -96,7 +96,7 @@ export const ToolApprovalSettingsPanel: React.FC = () => {
<SelectTrigger className="h-7 w-[120px] text-xs">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectContent className="z-[60]">
<SelectItem value="wait">Wait forever</SelectItem>
<SelectItem value="allow">Allow</SelectItem>
<SelectItem value="deny">Deny</SelectItem>