feat: add Proaktiv and KI Chat tabs to AI sidebar

This commit is contained in:
Agent Zero
2026-07-18 17:48:09 +02:00
parent df82796023
commit 7e53b747c7
5 changed files with 149 additions and 88 deletions
+7
View File
@@ -2,6 +2,7 @@ import { create } from 'zustand';
export type Theme = 'light' | 'dark' | 'system';
export type Locale = 'de' | 'en';
export type AISidebarTab = 'proactive' | 'chat';
export interface Toast {
id: string;
@@ -16,6 +17,7 @@ export interface UIState {
sidebarOpen: boolean;
suggestionSidebarOpen: boolean;
aiSidebarCollapsed: boolean;
aiSidebarTab: AISidebarTab;
toasts: Toast[];
setTheme: (theme: Theme) => void;
setLocale: (locale: Locale) => void;
@@ -24,6 +26,8 @@ export interface UIState {
toggleSuggestionSidebar: () => void;
toggleAISidebar: () => void;
setAISidebarCollapsed: (collapsed: boolean) => void;
setAISidebarTab: (tab: AISidebarTab) => void;
openAISidebarProactive: () => void;
addToast: (toast: Omit<Toast, 'id'>) => void;
removeToast: (id: string) => void;
clearToasts: () => void;
@@ -37,6 +41,7 @@ export const useUIStore = create<UIState>((set) => ({
sidebarOpen: true,
suggestionSidebarOpen: false,
aiSidebarCollapsed: true,
aiSidebarTab: 'chat',
toasts: [],
setTheme: (theme) => {
localStorage.setItem('leocrm_theme', theme);
@@ -51,6 +56,8 @@ export const useUIStore = create<UIState>((set) => ({
toggleSuggestionSidebar: () => set((s) => ({ suggestionSidebarOpen: !s.suggestionSidebarOpen })),
toggleAISidebar: () => set((s) => ({ aiSidebarCollapsed: !s.aiSidebarCollapsed })),
setAISidebarCollapsed: (collapsed) => set({ aiSidebarCollapsed: collapsed }),
setAISidebarTab: (tab) => set({ aiSidebarTab: tab }),
openAISidebarProactive: () => set({ aiSidebarCollapsed: false, aiSidebarTab: 'proactive' }),
addToast: (toast) => {
const id = `toast-${++toastIdCounter}`;
set((s) => ({ toasts: [...s.toasts, { ...toast, id }] }));