Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-worktree-reasoning-selector.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"kilo-code": patch
---

Fix the reasoning-variant (and mode) picker in the New Worktree dialog so selecting a variant actually applies. The pickers portaled their popover to the page body, where the dialog's modal overlay intercepted pointer events and swallowed the click before the option handler ran. Render the popovers inline (`portal={false}`), matching the model picker already fixed for the same reason.
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,13 @@ export const NewWorktreeDialog: Component<{ onClose: () => void; defaultBaseBran
<div class="prompt-input-hint">
<div class="prompt-input-hint-selectors">
<Show when={session.agents().length > 1}>
<ModeSwitcherBase agents={session.agents()} value={agent()} onSelect={setAgent} deferDismiss />
<ModeSwitcherBase
agents={session.agents()}
value={agent()}
onSelect={setAgent}
portal={false}
deferDismiss
/>
</Show>
<Show when={!compareMode()}>
<ModelSelectorBase
Expand All @@ -490,6 +496,7 @@ export const NewWorktreeDialog: Component<{ onClose: () => void; defaultBaseBran
variants={variants()}
value={effectiveVariant()}
onSelect={setVariant}
portal={false}
deferDismiss
/>
<Show when={overridden()}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export interface ModeSwitcherBaseProps {
value: string
/** Called when the user picks an agent */
onSelect: (name: string) => void
/** Render inline instead of through a portal when nested in a dialog. */
portal?: boolean
/** Delay outside dismissal while the popover opens inside a dialog. */
deferDismiss?: boolean
}
Expand Down Expand Up @@ -124,6 +126,7 @@ export const ModeSwitcherBase: Component<ModeSwitcherBaseProps> = (props) => {
expanded={false}
placement="top-start"
minHeight={100}
portal={props.portal}
deferDismiss={props.deferDismiss}
open={open()}
onOpenChange={onOpen}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export interface ThinkingSelectorBaseProps {
clearLabel?: string
/** Popover placement — defaults to top-start. */
placement?: "top-start" | "bottom-start" | "bottom-end" | "top-end"
/** Render inline instead of through a portal when nested in a dialog. */
portal?: boolean
/** Delay outside dismissal while the popover opens inside a dialog. */
deferDismiss?: boolean
/** Listen for the global prompt trigger event. Defaults to true. */
Expand Down Expand Up @@ -138,6 +140,7 @@ export const ThinkingSelectorBase: Component<ThinkingSelectorBaseProps> = (props
placement={props.placement ?? "top-start"}
preferredWidth={180}
minHeight={100}
portal={props.portal}
deferDismiss={props.deferDismiss}
open={open()}
onOpenChange={onOpen}
Expand Down
Loading