mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-19 13:33:35 +08:00
fix: soften error indicators in tool call groups — icon instead of red badge
- Replace "ERROR" text badge with material error icon (less visually jarring) - Add "pending" icon when tool results haven't been matched yet - Remove red border on error groups — all groups now use the same neutral border - Single tool call ERROR badge also changed to icon Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5e71da88c3
commit
5e4e7d3955
@ -71,9 +71,7 @@ export function ToolCallBlock({ toolName, input, result, compact = false }: Prop
|
|||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{result?.isError && (
|
{result?.isError && (
|
||||||
<span className="shrink-0 rounded-full bg-[var(--color-error-container)] px-1.5 py-0.5 text-[9px] font-bold text-[var(--color-error)]">
|
<span className="material-symbols-outlined shrink-0 text-[14px] text-[var(--color-error)]">error</span>
|
||||||
ERROR
|
|
||||||
</span>
|
|
||||||
)}
|
)}
|
||||||
{expandable && (
|
{expandable && (
|
||||||
<span className="material-symbols-outlined text-[14px] text-[var(--color-outline)]">
|
<span className="material-symbols-outlined text-[14px] text-[var(--color-outline)]">
|
||||||
|
|||||||
@ -75,11 +75,7 @@ function ToolCallGroupMulti({ toolCalls, resultMap, isStreaming }: Props) {
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setExpanded((v) => !v)}
|
onClick={() => setExpanded((v) => !v)}
|
||||||
className={`flex w-full items-center gap-2 rounded-lg px-3 py-1.5 text-left transition-colors ${
|
className="flex w-full items-center gap-2 rounded-lg border border-[var(--color-border)]/40 bg-[var(--color-surface-container-low)] px-3 py-1.5 text-left transition-colors hover:bg-[var(--color-surface-container-high)]"
|
||||||
errorPresent
|
|
||||||
? 'border border-[var(--color-error)]/20 bg-[var(--color-error-container)]/30 hover:bg-[var(--color-error-container)]/50'
|
|
||||||
: 'border border-[var(--color-border)]/40 bg-[var(--color-surface-container-low)] hover:bg-[var(--color-surface-container-high)]'
|
|
||||||
}`}
|
|
||||||
>
|
>
|
||||||
<span className="material-symbols-outlined text-[14px] text-[var(--color-outline)]">
|
<span className="material-symbols-outlined text-[14px] text-[var(--color-outline)]">
|
||||||
{expanded ? 'expand_less' : 'expand_more'}
|
{expanded ? 'expand_less' : 'expand_more'}
|
||||||
@ -90,10 +86,11 @@ function ToolCallGroupMulti({ toolCalls, resultMap, isStreaming }: Props) {
|
|||||||
{!isStreaming && allComplete && !errorPresent && (
|
{!isStreaming && allComplete && !errorPresent && (
|
||||||
<span className="material-symbols-outlined text-[14px] text-[var(--color-success)]">check_circle</span>
|
<span className="material-symbols-outlined text-[14px] text-[var(--color-success)]">check_circle</span>
|
||||||
)}
|
)}
|
||||||
{errorPresent && (
|
{!isStreaming && errorPresent && (
|
||||||
<span className="rounded-full bg-[var(--color-error-container)] px-2 py-0.5 text-[9px] font-bold uppercase text-[var(--color-error)]">
|
<span className="material-symbols-outlined text-[14px] text-[var(--color-error)]">error</span>
|
||||||
ERROR
|
)}
|
||||||
</span>
|
{!isStreaming && !allComplete && !errorPresent && (
|
||||||
|
<span className="material-symbols-outlined text-[14px] text-[var(--color-outline)]">pending</span>
|
||||||
)}
|
)}
|
||||||
{isStreaming && (
|
{isStreaming && (
|
||||||
<span className="h-1.5 w-1.5 rounded-full bg-[var(--color-brand)] animate-pulse-dot" />
|
<span className="h-1.5 w-1.5 rounded-full bg-[var(--color-brand)] animate-pulse-dot" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user