Multi chat (#6428)

This commit is contained in:
Zane
2026-01-21 07:13:55 -10:00
committed by GitHub
parent f26ffed587
commit a7699e1607
34 changed files with 1673 additions and 644 deletions
+12 -2
View File
@@ -41,9 +41,19 @@ export const createNavigationHandler = (navigate: NavigateFunction) => {
case 'chat':
navigate('/', { state: options });
break;
case 'pair':
navigate('/pair', { state: options });
case 'pair': {
// Put resumeSessionId in URL search params (not just state) so that:
// 1. The sidebar can read it to highlight the active session
// 2. Page refresh preserves which session is active
// 3. Browser back/forward navigation works correctly
const searchParams = new URLSearchParams();
if (options?.resumeSessionId) {
searchParams.set('resumeSessionId', options.resumeSessionId);
}
const url = searchParams.toString() ? `/pair?${searchParams.toString()}` : '/pair';
navigate(url, { state: options });
break;
}
case 'settings':
navigate('/settings', { state: options });
break;