fix: clean up draft branch dropdown
Avoids repeating the project root branch under Worktrees Adjusts the dropdown width for empty worktree lists
This commit is contained in:
@@ -3693,7 +3693,7 @@ const ChatInputComponent: React.FC<ChatInputProps> = ({ onOpenSettings, scrollTo
|
|||||||
rootBranch: selectedDraftProjectCurrentBranch,
|
rootBranch: selectedDraftProjectCurrentBranch,
|
||||||
worktrees,
|
worktrees,
|
||||||
pendingBootstrapDirectory: newSessionDraft?.bootstrapPendingDirectory ?? null,
|
pendingBootstrapDirectory: newSessionDraft?.bootstrapPendingDirectory ?? null,
|
||||||
});
|
}).filter((option) => option.kind === 'worktree');
|
||||||
}, [availableWorktreesByProject, newSessionDraft?.bootstrapPendingDirectory, selectedDraftProject, selectedDraftProjectCurrentBranch, selectedDraftProjectPath]);
|
}, [availableWorktreesByProject, newSessionDraft?.bootstrapPendingDirectory, selectedDraftProject, selectedDraftProjectCurrentBranch, selectedDraftProjectPath]);
|
||||||
|
|
||||||
const selectedDraftDirectory = React.useMemo(
|
const selectedDraftDirectory = React.useMemo(
|
||||||
@@ -4170,7 +4170,7 @@ const ChatInputComponent: React.FC<ChatInputProps> = ({ onOpenSettings, scrollTo
|
|||||||
{selectedDraftBranchLabel ?? t('chat.chatInput.branch')}
|
{selectedDraftBranchLabel ?? t('chat.chatInput.branch')}
|
||||||
</SelectValue>
|
</SelectValue>
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent fitContent>
|
<SelectContent className="w-max min-w-48">
|
||||||
{projectRootBranchOption ? (
|
{projectRootBranchOption ? (
|
||||||
<SelectGroup>
|
<SelectGroup>
|
||||||
<SelectLabel>{t('chat.chatInput.projectRoot')}</SelectLabel>
|
<SelectLabel>{t('chat.chatInput.projectRoot')}</SelectLabel>
|
||||||
|
|||||||
Reference in New Issue
Block a user