feat: multi-tab split view for 2 sessions side by side

- Add split view button (columns icon) in sidebar session actions
- Click to open any session in a secondary pane alongside the primary
- Resizable divider between panes (drag to resize, persisted in localStorage)
- Secondary pane supports full chat: history, streaming, send, abort
- Close split view via X button or clicking the split icon again
- Each pane has independent scroll, search, and tool collapse
- Keyboard shortcut and i18n support (EN/FR)
This commit is contained in:
Nicolas Varrot
2026-02-13 02:44:33 +00:00
parent 00bf6d156f
commit f09482e6cb
5 changed files with 369 additions and 8 deletions

View File

@@ -495,9 +495,18 @@ export function useGateway() {
hasUnread: unreadSessions.has(s.key),
}));
const getClient = useCallback(() => clientRef.current, []);
const addEventListener = useCallback((fn: (event: string, payload: JsonPayload) => void) => {
const client = clientRef.current;
if (!client) return () => {};
return client.onEvent(fn);
}, []);
return {
status, messages, sessions: enrichedSessions, activeSession, isGenerating, isLoadingHistory,
sendMessage, abort, switchSession, loadSessions, deleteSession,
authenticated, login, logout, connectError, isConnecting, agentIdentity,
getClient, addEventListener,
};
}