修复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

@@ -226,9 +226,12 @@ const TabPanel: React.FC<TabPanelProps> = ({ tab, isActive }) => {
);
case 'agent':
if (!tab.agentRunId) {
console.error('[TabContent] No agentRunId in tab:', tab);
return <div className="p-4">{t('messages.noAgentRunIdSpecified')}</div>;
}
return (
<AgentRunOutputViewer
agentRunId={tab.agentRunId}
@@ -317,6 +320,10 @@ export const TabContent: React.FC = () => {
const { tabs, activeTabId, createChatTab, findTabBySessionId, createClaudeFileTab, createAgentExecutionTab, createCreateAgentTab, createImportAgentTab, closeTab, updateTab } = useTabState();
const [hasInitialized, setHasInitialized] = React.useState(false);
// Debug: Monitor activeTabId changes
useEffect(() => {
}, [activeTabId, tabs]);
// Auto redirect to home when no tabs (but not on initial load)
useEffect(() => {
if (hasInitialized && tabs.length === 0) {