修复agents历史记录跳转

This commit is contained in:
2025-10-11 13:00:52 +08:00
parent 6aefec3312
commit e7775ce8ed
8 changed files with 53 additions and 40 deletions

View File

@@ -82,7 +82,7 @@ export const useTabState = (): UseTabStateReturn => {
return existingTab.id;
}
return addTab({
const newTabId = addTab({
type: 'agent',
title: agentName,
agentRunId,
@@ -90,6 +90,7 @@ export const useTabState = (): UseTabStateReturn => {
hasUnsavedChanges: false,
icon: 'bot'
});
return newTabId;
}, [addTab, tabs, setActiveTab]);
const createProjectsTab = useCallback((): string | null => {
@@ -346,4 +347,4 @@ export const useTabState = (): UseTabStateReturn => {
findTabByType,
canAddTab
};
};
};