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