mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-19 01:51:21 +08:00
fix(agent-manager): prevent Escape key from committing worktree rename (#6176)
This commit is contained in:
@@ -1117,14 +1117,23 @@ const AgentManagerContent: Component = () => {
|
||||
setRenameValue(current)
|
||||
}
|
||||
|
||||
let cancelled = false
|
||||
|
||||
const commitRename = (wtId: string) => {
|
||||
if (cancelled) {
|
||||
cancelled = false
|
||||
return
|
||||
}
|
||||
const value = renameValue().trim()
|
||||
setRenamingWt(null)
|
||||
if (!value) return
|
||||
vscode.postMessage({ type: "agentManager.renameWorktree", worktreeId: wtId, label: value })
|
||||
}
|
||||
|
||||
const cancelRename = () => setRenamingWt(null)
|
||||
const cancelRename = () => {
|
||||
cancelled = true
|
||||
setRenamingWt(null)
|
||||
}
|
||||
|
||||
return (
|
||||
<For each={sortedWorktrees()}>
|
||||
|
||||
Reference in New Issue
Block a user