feat: profile-aware cache isolation and UX improvements

- Fix chat store cache keys to include profile name, prevent data leaking between profiles
- Defer cache hydration to after profile load to avoid race condition
- Remove collapsible sidebar feature (not needed)
- Remove confirmation dialog on profile switch (direct reload)
- Auto-start gateway when creating new profile
- Clear profile-specific localStorage cache on profile delete (safe prefix matching)
- Clean up unused imports in SettingsView

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ekko
2026-04-18 14:32:54 +08:00
parent 17f0cdc1de
commit 27051dcb32
6 changed files with 97 additions and 79 deletions
@@ -35,20 +35,12 @@ async function toggleDetail() {
}
function handleSwitch() {
dialog.warning({
title: t('profiles.switchTo'),
content: t('profiles.switchConfirm', { name: props.profile.name }),
positiveText: t('common.confirm'),
negativeText: t('common.cancel'),
onPositiveClick: async () => {
profilesStore.switchProfile(props.profile.name).then(ok => {
if (ok) {
window.location.reload()
} else {
message.error(t('profiles.switchFailed'))
}
})
},
profilesStore.switchProfile(props.profile.name).then(ok => {
if (ok) {
window.location.reload()
} else {
message.error(t('profiles.switchFailed'))
}
})
}