fix: AI loop prevention (no tools on last iteration), calendar button first, mail filter in toolbar, AI folder rename query invalidation
Check Cross-Plugin Imports / check (push) Has been cancelled

This commit is contained in:
Agent Zero
2026-07-30 11:33:45 +02:00
parent 124846ae3b
commit acea622a0f
4 changed files with 73 additions and 49 deletions
+6 -1
View File
@@ -1,5 +1,6 @@
import React, { useEffect, useState, useRef, useCallback } from 'react';
import clsx from 'clsx';
import { useQueryClient } from '@tanstack/react-query';
import {
fetchSessions, createSession, deleteSession, updateSession,
fetchFolders, createFolder, deleteFolder, updateFolder,
@@ -261,6 +262,7 @@ export function SessionList({ activeSessionId, onSelectSession, isSidebar, class
const [dragSessionId, setDragSessionId] = useState<string | null>(null);
const [dragFolderId, setDragFolderId] = useState<string | null>(null);
const [contextMenu, setContextMenu] = useState<ContextMenuState | null>(null);
const queryClient = useQueryClient();
const loadData = async () => {
try {
@@ -287,7 +289,10 @@ export function SessionList({ activeSessionId, onSelectSession, isSidebar, class
if (!newName) return;
try {
if (type === 'session') await updateSession(id, { title: newName });
else await updateFolder(id, { name: newName });
else {
await updateFolder(id, { name: newName });
queryClient.invalidateQueries({ queryKey: ['ai', 'folders'] });
}
loadData();
} catch (e) { setError(e instanceof Error ? e.message : 'Rename failed'); }
};