From 365daa9c6dcd86608e1812d6fd68efb69fd4595d Mon Sep 17 00:00:00 2001 From: brownrw8 Date: Wed, 22 Jan 2025 14:54:08 -1000 Subject: [PATCH] another comment --- webview-ui/src/components/chat/Announcement.tsx | 3 +++ 1 file changed, 3 insertions(+) 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" })