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
@@ -32,6 +32,15 @@ profileRoutes.post('/api/hermes/profiles', async (ctx) => {
try {
const output = await hermesCli.createProfile(name, clone)
// 创建完成后启动该 profile 的网关
const mgr = getGatewayManager()
if (mgr) {
try { await mgr.start(name) } catch (err: any) {
console.error(`[Profile] Failed to start gateway for ${name}:`, err.message)
}
}
ctx.body = { success: true, message: output.trim() }
} catch (err: any) {
ctx.status = 500