- Updated the TeamAgentToolsInstaller to version 5, introducing a new command for adding comments to tasks. - Implemented the addTaskComment function to handle comment creation, including validation and notification to task owners. - Enhanced the TeamDataService to support fetching tasks alongside tool installation. - Updated UI components to display unread comment counts and improve user interaction with task comments. - Refactored various components to integrate task comments seamlessly into the existing workflow. These changes aim to improve collaboration and communication within teams by facilitating task-related discussions.
27 lines
724 B
TypeScript
27 lines
724 B
TypeScript
import { MessageSquare } from 'lucide-react';
|
|
|
|
interface UnreadCommentsBadgeProps {
|
|
unreadCount: number;
|
|
totalCount: number;
|
|
}
|
|
|
|
export const UnreadCommentsBadge = ({
|
|
unreadCount,
|
|
totalCount,
|
|
}: UnreadCommentsBadgeProps): React.JSX.Element | null => {
|
|
if (totalCount === 0) return null;
|
|
|
|
return (
|
|
<span
|
|
className={`inline-flex items-center gap-0.5 rounded-full px-1.5 py-0 text-[10px] font-medium ${
|
|
unreadCount > 0
|
|
? 'bg-blue-500/20 text-blue-400'
|
|
: 'bg-[var(--color-surface-raised)] text-[var(--color-text-muted)]'
|
|
}`}
|
|
title={unreadCount > 0 ? `${unreadCount} unread` : 'All read'}
|
|
>
|
|
<MessageSquare size={10} />
|
|
{totalCount}
|
|
</span>
|
|
);
|
|
};
|