diff --git a/webview-ui/src/components/chat/Announcement.tsx b/webview-ui/src/components/chat/Announcement.tsx index d84ac4758c..8bc6a55322 100644 --- a/webview-ui/src/components/chat/Announcement.tsx +++ b/webview-ui/src/components/chat/Announcement.tsx @@ -8,6 +8,9 @@ interface AnnouncementProps { hideAnnouncement: () => void } +/* +You must update the latestAnnouncementId in ClineProvider for new announcements to show to users. This new id will be compared with whats in state for the 'last announcement shown', and if it's different then the announcement will render. As soon as an announcement is shown, the id will be updated in state. This ensures that announcements are not shown more than once, even if the user doesn't close it themselves. +*/ const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => { const { t } = useTranslation("translation", { keyPrefix: "announcement" })