From 7a03cfff36286120a10e42c4655025cb418848e9 Mon Sep 17 00:00:00 2001 From: xintaofei Date: Wed, 22 Apr 2026 22:56:36 +0800 Subject: [PATCH] fix(branch-picker): strip remote prefix when checking out remote branches --- .../chat/conversation-context-bar.tsx | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/src/components/chat/conversation-context-bar.tsx b/src/components/chat/conversation-context-bar.tsx index aece189..203caac 100644 --- a/src/components/chat/conversation-context-bar.tsx +++ b/src/components/chat/conversation-context-bar.tsx @@ -301,21 +301,28 @@ const BranchPicker = memo(function BranchPicker({ count: branchList.remote.length, })} > - {branchList.remote.map((b) => ( - { - setOpen(false) - void onCheckout(b) - }} - > - - - {b} - - - ))} + {branchList.remote.map((b) => { + const localName = b.replace(/^[^/]+\//, "") + return ( + { + setOpen(false) + if (localName !== currentBranch) + void onCheckout(localName) + }} + > + + + {b} + + {localName === currentBranch && ( + + )} + + ) + })} )}