增加直接创建会话

This commit is contained in:
2025-10-16 11:34:10 +08:00
parent b2be1ac401
commit 9d30fd0dac
13 changed files with 818 additions and 25 deletions

View File

@@ -221,16 +221,16 @@ export const TabManager: React.FC<TabManagerProps> = ({ className }) => {
if (session && canAddTab()) {
// Create a new chat tab with the session data
const tabId = createChatTab();
// Update the tab with session data
setTimeout(() => {
updateTab(tabId, {
type: 'chat',
title: session.project_path.split('/').pop() || 'Session',
sessionId: session.id,
sessionData: session,
initialProjectPath: projectPath || session.project_path,
});
}, 100);
// Update the tab with session data immediately
updateTab(tabId, {
type: 'chat',
title: session.project_path.split('/').pop() || 'Session',
sessionId: session.id,
sessionData: session,
initialProjectPath: projectPath || session.project_path,
});
// Switch to the new tab immediately
switchToTab(tabId);
}
};