Skip to content

Commit

Permalink
update styles
Browse files Browse the repository at this point in the history
  • Loading branch information
abeatrix committed Feb 14, 2025
1 parent 02bc0d2 commit 023e374
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions vscode/webviews/chat/ChatMessageContent/ChatMessageContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const extractThinkContent = (content: string): StreamingContent => {
return {
displayContent,
thinkContent,
hasThinkTag: thinkMatches.length > 0 || hasOpenThinkTag,
hasThinkTag: hasOpenThinkTag,
}
}

Expand Down Expand Up @@ -253,13 +253,20 @@ export const ChatMessageContent: React.FunctionComponent<ChatMessageContentProps

return (
<div ref={rootRef} data-testid="chat-message-content">
{hasThinkTag && (
{thinkContent.length > 0 && (
<details
open
className="tw-container tw-mb-7 tw-border tw-border-gray-500/20 dark:tw-border-gray-600/40 tw-rounded-lg tw-overflow-hidden tw-backdrop-blur-sm"
title="Thinking / Reasoning Space."
>
<summary className="tw-flex tw-items-center tw-gap-2 tw-px-3 tw-py-2 tw-bg-gray-100/50 dark:tw-bg-gray-800/80 tw-cursor-pointer hover:tw-bg-gray-200/50 dark:hover:tw-bg-gray-700/50 tw-select-none tw-transition-colors">
<summary
className={clsx(
'tw-flex tw-items-center tw-gap-2 tw-px-3 tw-py-2 tw-bg-gray-100/50 dark:tw-bg-gray-800/80 tw-cursor-pointer hover:tw-bg-gray-200/50 dark:hover:tw-bg-gray-700/50 tw-select-none tw-transition-colors',
{
'tw-animate-pulse': hasThinkTag,
}
)}
>
<PlusIcon size={16} className="tw-text-gray-500 dark:tw-text-gray-400" />
<span className="tw-font-medium tw-text-gray-600 dark:tw-text-gray-300">
Thinking...
Expand Down

0 comments on commit 023e374

Please sign in to comment.