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
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,6 @@ const PersistentFooterActions: React.FC = () => {
<MessageCircle size={14} />
<span>{t('header.feedback')}</span>
</button>
<button
type="button"
className="bitfun-nav-panel__footer-menu-item"
role="menuitem"
onClick={handleFeedback}
>
<MessageCircle size={14} />
<span>{t('header.feedback')}</span>
</button>
<button
type="button"
className="bitfun-nav-panel__footer-menu-item"
Expand Down
17 changes: 11 additions & 6 deletions src/web-ui/src/flow_chat/tool-cards/CompactToolCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export interface CompactToolCardProps {
export const CompactToolCard: React.FC<CompactToolCardProps> = ({
status,
isExpanded = false,
onClick,
onMouseDown,
onMouseUp,
onMouseMove,
Expand All @@ -48,12 +49,16 @@ export const CompactToolCard: React.FC<CompactToolCardProps> = ({
header,
expandedContent,
}) => {
const handleWrapperClick = (event: React.MouseEvent) => {
if (!onMouseUp || shouldIgnoreCardToggleClick(event)) {
const handleClick = (event: React.MouseEvent) => {
if (shouldIgnoreCardToggleClick(event)) {
return;
}

onMouseUp(event);
if (onClick) {
onClick(event);
} else if (onMouseUp) {
onMouseUp(event);
}
};

const loadingShimmer =
Expand All @@ -68,11 +73,11 @@ export const CompactToolCard: React.FC<CompactToolCardProps> = ({
<BaseToolCard
status={status}
isExpanded
onClick={handleWrapperClick}
onClick={handleClick}
className={`compact-tool-card-wrapper--expanded-card ${className}`.trim()}
header={header}
expandedContent={expandedContent}
headerExpandAffordance={clickable || Boolean(onMouseUp)}
headerExpandAffordance={clickable || Boolean(onClick) || Boolean(onMouseUp)}
/>
);
}
Expand All @@ -85,7 +90,7 @@ export const CompactToolCard: React.FC<CompactToolCardProps> = ({
className={`compact-tool-card status-${status} ${clickable ? 'clickable' : ''} ${isExpanded ? 'expanded' : ''}`}
onMouseDown={onMouseDown}
onMouseMove={onMouseMove}
onMouseUp={handleWrapperClick}
onMouseUp={handleClick}
style={{ cursor: clickable ? 'pointer' : 'default' }}
>
{header}
Expand Down
Loading