Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions ui/desktop/src/components/ToolCallArguments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,28 @@ export function ToolCallArguments({ args }: ToolCallArgumentsProps) {

return (
<div className="text-sm mb-2">
<div className="flex flex-row">
<span className="text-textSubtle min-w-[140px]">{key}</span>
<div className="w-full flex justify-between items-start">
<div className="flex flex-row items-stretch">
<button
onClick={() => toggleKey(key)}
className="flex text-left text-textSubtle min-w-[140px]"
>
<span>{key}</span>
</button>
<div className="w-full flex items-stretch">
{isExpanded ? (
<div className="">
<div>
<MarkdownContent content={value} className="text-sm text-textPlaceholder" />
</div>
) : (
<span className="text-textPlaceholder mr-2">{value.slice(0, 60)}...</span>
<button onClick={() => toggleKey(key)} className="text-left text-textPlaceholder">
{value.slice(0, 60)}...
</button>
)}
<button
onClick={() => toggleKey(key)}
className="hover:opacity-75 text-textPlaceholder pr-2"
className="flex flex-row items-stretch grow text-textPlaceholder pr-2"
>
<div className="min-w-2 grow" />
<Expand size={5} isExpanded={isExpanded} />
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion ui/desktop/src/components/ui/Expand.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ChevronUp } from 'lucide-react';
export default function Expand({ size, isExpanded }: { size: number; isExpanded: boolean }) {
return (
<ChevronUp
className={`w-${size} h-${size} text-textPlaceholder transition-all origin-center ${isExpanded ? 'rotate-180' : 'rotate-90'}`}
className={`shrink-0 w-${size} h-${size} text-textPlaceholder transition-all origin-center ${isExpanded ? 'rotate-180' : 'rotate-90'}`}
/>
);
}
Loading