diff --git a/webview-ui/src/components/chat/Announcement.tsx b/webview-ui/src/components/chat/Announcement.tsx index a4587c752a..ed21f261d2 100644 --- a/webview-ui/src/components/chat/Announcement.tsx +++ b/webview-ui/src/components/chat/Announcement.tsx @@ -11,8 +11,6 @@ interface AnnouncementProps { const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => { const { t, ready } = useTranslation("translation", { keyPrefix: "announcement", useSuspense: false }) - const newChangesList = t("newChangesList", { returnObjects: true }) as Array - const minorVersion = version.split(".").slice(0, 2).join(".") // 2.0.0 -> 2.0 return ( ready && ( @@ -33,16 +31,29 @@ const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => {

{t("newInVersion", { version: minorVersion })}

{ setModelIdErrorMessage(undefined) }, [apiConfiguration]) + // validate as soon as the component is mounted + /* + useEffect will use stale values of variables if they are not included in the dependency array. so trying to use useEffect with a dependency array of only one value for example will use any other variables' old values. In most cases you don't want this, and should opt to use react-use hooks. + + useEffect(() => { + // uses someVar and anotherVar + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [someVar]) + + If we only want to run code once on mount we can use react-use's useEffectOnce or useMount + */ + const handleResetState = () => { vscode.postMessage({ type: "resetState" }) } diff --git a/webview-ui/src/locales/de/translation.json b/webview-ui/src/locales/de/translation.json index 96137caea2..e4d760d84e 100644 --- a/webview-ui/src/locales/de/translation.json +++ b/webview-ui/src/locales/de/translation.json @@ -1,13 +1,6 @@ { "announcement": { "newInVersion": "Neu in Version {{version}}", - "newChangesList": [ - "Plan/Act-Modus-Umschaltung: Im Plan-Modus konzentriert sich Cline darauf, Informationen zu sammeln, klärende Fragen zu stellen, Ideen zu brainstormen und eine Lösung zu entwerfen. Wechseln Sie zurück in den Act-Modus, um den Plan auszuführen!", - "Schnelles API/Modell-Wechseln mit einem neuen Popup-Menü unter dem Chat-Feld", - "VS Code LM API ermöglicht die Verwendung von Modellen aus anderen Erweiterungen wie GitHub Copilot", - "MCP-Server-Verbesserungen: Ein-/Ausschaltfunktion zum Deaktivieren von Servern, wenn sie nicht verwendet werden, und Auto-Approve-Option für einzelne Tools", - "Falls Sie es verpasst haben, Cline unterstützt jetzt Checkpoints! Sehen Sie es hier in Aktion." - ], "joinOurCommunities": "Treten Sie unserem Discord oder Reddit für weitere Updates bei!" }, "settingsView": { diff --git a/webview-ui/src/locales/en/translation.json b/webview-ui/src/locales/en/translation.json index 666578a8a1..79e79ff3f5 100644 --- a/webview-ui/src/locales/en/translation.json +++ b/webview-ui/src/locales/en/translation.json @@ -1,13 +1,6 @@ { "announcement": { "newInVersion": "New in version {{version}}", - "newChangesList": [ - "Plan/Act mode toggle: Plan mode lets Cline focus on gathering information, asking clarifying questions, brainstorm ideas, and architect a solution. Switch back to Act mode to let him execute the plan!", - "Quick API/model switching with a new popup menu under the chat field", - "VS Code LM API lets you use models from other extensions like GitHub Copilot", - "MCP server improvements: On/off toggle to disable servers when not in use, and Auto-approve option for individual tools", - "In case you missed it, Cline now supports Checkpoints! See it in action here." - ], "joinOurCommunities": "Join our Discord or Reddit for more updates!" }, "settingsView": { diff --git a/webview-ui/src/locales/ja/translation.json b/webview-ui/src/locales/ja/translation.json index 5918af5dfe..dbb6907e90 100644 --- a/webview-ui/src/locales/ja/translation.json +++ b/webview-ui/src/locales/ja/translation.json @@ -1,13 +1,6 @@ { "announcement": { "newInVersion": "バージョン{{version}}の新機能", - "newChangesList": [ - "プラン/アクトモードの切り替え: プランモードでは、Clineが情報収集、質問の明確化、アイデアのブレインストーミング、ソリューションの設計に集中します。アクトモードに戻すと、計画を実行します!", - "新しいポップアップメニューでチャットフィールドの下にあるAPI/モデルのクイック切り替え", - "VS Code LM APIは、GitHub Copilotのような他の拡張機能からモデルを使用できます", - "MCPサーバーの改善: 使用していないときにサーバーを無効にするオン/オフ切り替え、および個々のツールの自動承認オプション", - "見逃した場合のために、Clineは現在チェックポイントをサポートしています! こちらでアクションを確認してください。" - ], "joinOurCommunities": "最新情報を得るために、DiscordまたはRedditに参加してください!" }, "settingsView": { diff --git a/webview-ui/src/locales/zh-cn/translation.json b/webview-ui/src/locales/zh-cn/translation.json index 0044f842a1..2bd9c67a4d 100644 --- a/webview-ui/src/locales/zh-cn/translation.json +++ b/webview-ui/src/locales/zh-cn/translation.json @@ -1,13 +1,6 @@ { "announcement": { "newInVersion": "版本 {{version}} 中的新功能", - "newChangesList": [ - "计划/执行模式切换: 计划模式让 Cline 专注于收集信息、提出澄清问题、头脑风暴和架构解决方案。切换回执行模式,让他执行计划!", - "快速 API/模型切换,在聊天字段下有一个新的弹出菜单", - "VS Code LM API 允许您使用其他扩展中的模型,如 GitHub Copilot", - "MCP 服务器改进: 开/关切换以在不使用时禁用服务器,并为单个工具提供自动批准选项", - "如果您错过了,Cline 现在支持检查点!在这里查看。" - ], "joinOurCommunities": "加入我们的 DiscordReddit 获取更多更新!" }, "settingsView": { diff --git a/webview-ui/src/locales/zh-tw/translation.json b/webview-ui/src/locales/zh-tw/translation.json index 2b42408367..688268cbf3 100644 --- a/webview-ui/src/locales/zh-tw/translation.json +++ b/webview-ui/src/locales/zh-tw/translation.json @@ -1,13 +1,6 @@ { "announcement": { "newInVersion": "版本 {{version}} 中的新功能", - "newChangesList": [ - "計劃/執行模式切換: 計劃模式讓 Cline 專注於收集信息、提出澄清問題、頭腦風暴和架構解決方案。切換回執行模式,讓他執行計劃!", - "快速 API/模型切換,在聊天字段下有一個新的彈出菜單", - "VS Code LM API 允許您使用其他擴展中的模型,如 GitHub Copilot", - "MCP 伺服器改進: 開/關切換以在不使用時禁用伺服器,並為單個工具提供自動批准選項", - "如果您錯過了,Cline 現在支持檢查點!在這裡查看。" - ], "joinOurCommunities": "加入我們的 DiscordReddit 獲取更多更新!" }, "settingsView": {