mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
fix(vscode): address sidebar worktree review feedback
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user