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:
@@ -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'))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user