Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(desktop): 推荐提示词偏好只持久化非默认值
Shinku251905ff73b7
diff --git a/apps/desktop/src/renderer/hooks/usePromptRecommendationPreference.ts b/apps/desktop/src/renderer/hooks/usePromptRecommendationPreference.tsindex 23dd06aaba..09b479f1cd 100644--- a/apps/desktop/src/renderer/hooks/usePromptRecommendationPreference.ts+++ b/apps/desktop/src/renderer/hooks/usePromptRecommendationPreference.ts@@ -31,7 +31,13 @@ export function usePromptRecommendationPreference(): {memoryValue = next;setState(next);try {- localStorage.setItem(PROMPT_RECOMMENDATION_KEY, String(next));+ // 只持久化非默认值(默认是 true/enabled),避免把默认值固化回用户配置。+ // 如果未来版本默认值变化,未显式自定义的用户自动跟随新默认。+ if (next) {+ localStorage.removeItem(PROMPT_RECOMMENDATION_KEY);+ } else {+ localStorage.setItem(PROMPT_RECOMMENDATION_KEY, 'false');+ }} catch {// localStorage 不可用 → 静默; 模块级内存值仍在本渲染进程内生效。}