fix(chats): align folders and session actions
Render managed Chats through the shared folder-aware session group and keep folder ownership at the Chats root, including new drafts and older per-directory scopes. Hide worktree actions for Chats, make worktree shortcuts inert on Chat drafts, and let new-session shortcuts inherit an active session directory while explicit Chats controls still create managed Chat drafts.
This commit is contained in:
@@ -316,7 +316,9 @@ export const useKeyboardShortcuts = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
openNewSessionDraft();
|
||||
openNewSessionDraft(currentSessionId && currentDirectory
|
||||
? { directoryOverride: currentDirectory }
|
||||
: undefined);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -193,7 +193,13 @@ export const useMenuActions = (
|
||||
case 'new-session':
|
||||
setActiveMainTab('chat');
|
||||
setSessionSwitcherOpen(false);
|
||||
openNewSessionDraft();
|
||||
{
|
||||
const sessionState = useSessionUIStore.getState();
|
||||
const directory = useDirectoryStore.getState().currentDirectory;
|
||||
openNewSessionDraft(sessionState.currentSessionId && directory
|
||||
? { directoryOverride: directory }
|
||||
: undefined);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'new-worktree-session':
|
||||
|
||||
@@ -34,7 +34,10 @@ export const useMiniChatKeyboardShortcuts = () => {
|
||||
|
||||
if (eventMatchesShortcut(event, combo('new_chat'))) {
|
||||
event.preventDefault();
|
||||
openNewSessionDraft();
|
||||
const sessionState = useSessionUIStore.getState();
|
||||
openNewSessionDraft(sessionState.currentSessionId && sessionState.currentSessionDirectory
|
||||
? { directoryOverride: sessionState.currentSessionDirectory }
|
||||
: undefined);
|
||||
focusChatInput();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user