fix(vscode): address sidebar worktree review feedback

This commit is contained in:
kirillk
2026-04-24 16:14:09 -04:00
parent 04474986a0
commit 236d09f334
2 changed files with 5 additions and 2 deletions
@@ -1539,6 +1539,9 @@ export class AgentManagerProvider implements Disposable {
public async createFromSidebar(baseBranch?: string, branchName?: string): Promise<void> {
this.openPanel()
const panel = this.panel
if (!panel) return
await panel.waitForReady()
await this.waitForStateReady("createFromSidebar")
await this.onCreateWorktree(baseBranch, branchName)
}
@@ -143,7 +143,7 @@ export const ChatView: Component<ChatViewProps> = (props) => {
const startWorktree = () => vscode.postMessage({ type: "agentManager.createWorktree" })
const startWorktreeFromBranch = () =>
vscode.postMessage({ type: "agentManager.createWorktree", baseBranch: repoBranch() || undefined })
vscode.postMessage({ type: "agentManager.createWorktree", baseBranch: repoBranch()! })
const openAgentManager = () => vscode.postMessage({ type: "openAgentManager" })
@@ -238,7 +238,7 @@ export const ChatView: Component<ChatViewProps> = (props) => {
</Tooltip>
<DropdownMenu.Portal>
<DropdownMenu.Content class="session-worktree-split-menu">
<DropdownMenu.Item onSelect={startWorktreeFromBranch}>
<DropdownMenu.Item disabled={!repoBranch()} onSelect={startWorktreeFromBranch}>
<span class="session-worktree-menu-gap" aria-hidden="true" />
<DropdownMenu.ItemLabel class="session-worktree-menu-label">
<span>{language.t("sidebar.session.newWorktree.from")}</span>