integrate ai gateway and improve ui components (#1145)

This commit is contained in:
josh 2025-09-01 11:07:07 +01:00 committed by GitHub
parent 7315ced92f
commit dff2191611
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 235 additions and 217 deletions

View file

@ -54,6 +54,9 @@ export const CodeBlock = ({
fontSize: '0.875rem',
background: 'hsl(var(--background))',
color: 'hsl(var(--foreground))',
overflowX: 'auto',
overflowWrap: 'break-word',
wordBreak: 'break-all',
}}
language={language}
lineNumberStyle={{
@ -77,6 +80,9 @@ export const CodeBlock = ({
fontSize: '0.875rem',
background: 'hsl(var(--background))',
color: 'hsl(var(--foreground))',
overflowX: 'auto',
overflowWrap: 'break-word',
wordBreak: 'break-all',
}}
language={language}
lineNumberStyle={{

View file

@ -65,16 +65,16 @@ export const ToolHeader = ({
}: ToolHeaderProps) => (
<CollapsibleTrigger
className={cn(
'flex w-full items-center justify-between gap-4 p-3',
'flex w-full items-center justify-between gap-2 p-3 min-w-0',
className,
)}
{...props}
>
<div className="flex items-center gap-2">
<WrenchIcon className="size-4 text-muted-foreground" />
<span className="font-medium text-sm">{type}</span>
<div className="flex items-center gap-2 min-w-0 flex-1">
<WrenchIcon className="size-4 text-muted-foreground shrink-0" />
<span className="font-medium text-sm truncate">{type}</span>
</div>
<div className="flex items-center gap-2">
<div className="flex items-center gap-2 shrink-0">
{getStatusBadge(state)}
<ChevronDownIcon className="size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180" />
</div>