fix: address code review findings — consistent px-3, rounded-lg, leading-[1.3]

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
程序员阿江(Relakkes) 2026-04-06 21:41:48 +08:00
parent d25be78f0c
commit be9ae99793
3 changed files with 6 additions and 6 deletions

View File

@ -67,7 +67,7 @@ export function CodeViewer({ code, language, maxLines = 20, showLineNumbers = tr
<span className="w-0" />
)}
<span
className="overflow-hidden bg-white px-4 py-px whitespace-pre-wrap break-words text-[#24292f]"
className="overflow-hidden bg-white px-3 py-px whitespace-pre-wrap break-words text-[#24292f]"
dangerouslySetInnerHTML={{ __html: highlightedLines[index] ?? escapeHtml(line) }}
/>
</div>

View File

@ -98,7 +98,7 @@ function renderPermissionPreview(toolName: string, input: unknown) {
if (toolName === 'Bash' && typeof obj.command === 'string') {
return (
<div className="overflow-x-auto rounded-[var(--radius-md)] bg-[#1e1e1e] px-3 py-2.5">
<pre className="font-[var(--font-mono)] text-[11px] leading-[1.45] text-[#d4d4d4] whitespace-pre-wrap break-words">
<pre className="font-[var(--font-mono)] text-[11px] leading-[1.3] text-[#d4d4d4] whitespace-pre-wrap break-words">
<span className="text-[#28c840] select-none">$ </span>{obj.command}
</pre>
</div>
@ -209,7 +209,7 @@ export function PermissionDialog({ requestId, toolName, input, description }: Pr
)}
{allowRawToggle && showRaw && (
<pre className="mt-2 max-h-[220px] overflow-y-auto overflow-x-auto rounded-[var(--radius-md)] bg-[#1e1e1e] px-3 py-2.5 font-[var(--font-mono)] text-[11px] leading-[1.45] text-[#d4d4d4] whitespace-pre-wrap break-words">
<pre className="mt-2 max-h-[220px] overflow-y-auto overflow-x-auto rounded-[var(--radius-md)] bg-[#1e1e1e] px-3 py-2.5 font-[var(--font-mono)] text-[11px] leading-[1.3] text-[#d4d4d4] whitespace-pre-wrap break-words">
{rawInput}
</pre>
)}

View File

@ -110,7 +110,7 @@ function renderPreview(
if (toolName === 'Bash' && typeof obj.command === 'string') {
return (
<TerminalChrome title={typeof obj.description === 'string' ? obj.description : filePath}>
<div className="px-3 py-2.5 font-[var(--font-mono)] text-[11px] leading-[1.45] text-[#d8d8d8]">
<div className="px-3 py-2.5 font-[var(--font-mono)] text-[11px] leading-[1.3] text-[#d8d8d8]">
<span className="text-[#28c840]">$</span> {obj.command}
</div>
</TerminalChrome>
@ -125,7 +125,7 @@ function renderPreview(
const text = extractTextContent(result.content)
if (text) {
return (
<div className={`overflow-hidden rounded-2xl border ${
<div className={`overflow-hidden rounded-lg border ${
result.isError
? 'border-[var(--color-error)]/20 bg-[var(--color-error-container)]/60'
: 'border-[var(--color-border)] bg-[var(--color-surface)]'
@ -153,7 +153,7 @@ function renderDetails(toolName: string, obj: Record<string, unknown>) {
const text = JSON.stringify(obj, null, 2)
return (
<div className="overflow-hidden rounded-2xl border border-[var(--color-border)] bg-[var(--color-surface)]">
<div className="overflow-hidden rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)]">
<div className="flex items-center justify-between border-b border-[var(--color-border)] px-3 py-2 text-[10px] uppercase tracking-[0.18em] text-[var(--color-outline)]">
<span>Tool Input</span>
<CopyButton