mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-14 03:30:19 +00:00
7ad6e2aa25
* 🐛 fix(agent): make working-directory Clear actually clear legacy / default-sourced cwd The "Clear" action in the working-directory picker was a no-op whenever the shown directory came from a precedence level that clear() never touched: - clear() only removed the topic override and the agent's per-device choice (workingDirByDevice), but the button's visibility was gated on selectedDir, which also resolves from legacyAgentWorkingDirectory (pre-migration localStorage pick) and deviceDefaultCwd (device-wide default). When the cwd came from either, clear() deleted an already-empty higher level → nothing changed. Fixes: - useCommitWorkingDirectory: when clearing at the agent-default scope, also drop the legacy per-agent value (localStorage-only, no network round-trip). - WorkingDirectoryPicker: gate the Clear button on hasClearableSelection (topic / agent choice / legacy) instead of selectedDir, so it no longer renders as a dead button when the cwd comes solely from the device default (which isn't clearable from the agent picker). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * 💄 style(claude-code): slow token count-up animation to 2000ms Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>