Skip to content

feat(agent-manager): effort selection in compare models, fix worktree prompt scrollbars - #12401

Merged
marius-kilocode merged 1 commit into
mainfrom
investigate-issue-12377
Jul 20, 2026
Merged

feat(agent-manager): effort selection in compare models, fix worktree prompt scrollbars#12401
marius-kilocode merged 1 commit into
mainfrom
investigate-issue-12377

Conversation

@marius-kilocode

@marius-kilocode marius-kilocode commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Fixes #12377.

The new-worktree dialog's prompt field could show two nested scrollbars at once: the wrapper around the textarea scrolled (overflow-y: auto) while the textarea itself also scrolled once its JS-driven height hit the 200px cap, with min-height: 100% forcing the wrapper to overflow even for modest content. The prompt area now follows the same model as the sidebar chat input: the container is the only element that changes size (auto-grow capped at 200px of text, manual bottom-edge resize preserved), and the textarea fills it and is the only element that scrolls. The dialog is also wider (512px to 640px) so longer prompts stay readable.

The issue also asks for effort selection in the model comparison window. Compare Models never had per-model reasoning effort: the selector row is hidden in compare mode and allocations only carried a count. Checked models that declare reasoning variants now get an effort dropdown next to the count dropdown, and the picked effort is threaded through modelAllocations into each created session's initial message. A per-model pick wins over the dialog-level variant, and the collapsed selector summarizes it, e.g. "Claude Opus 4.8 (high)". Models without variants behave as before.

file-5ab44f507922e5bdbee6bd008a7eb4b0 file-7a9773e07c2ea5b5c3867f02f5caafb2 file-62e1e8cd48f248b7bdaee9f2687b2e30

@marius-kilocode
marius-kilocode merged commit 85be09b into main Jul 20, 2026
23 checks passed
@marius-kilocode
marius-kilocode deleted the investigate-issue-12377 branch July 20, 2026 10:15
// next input re-fits the height.
box.style.height = "auto"
const chrome = box.offsetHeight - area.offsetHeight
box.style.height = `${Math.min(area.scrollHeight, 200) + chrome}px`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Manual container resize is wiped on every keystroke

adjustHeight() runs on every input/paste/undo/speech-insert event and unconditionally sets box.style.height = "auto" before recomputing from scrollHeight. Since .am-nv-dialog .am-prompt-input-container has resize: vertical, a user who manually drags the container taller sets an inline height on this same element — which gets discarded the moment they type another character, snapping the box back to the content-fit size. This contradicts the PR's own claim (changeset + comment above) that "manual resize of the prompt area keeps working." Consider tracking whether the user has manually resized (e.g. via a flag set on mousedown/native resize observation) and skipping the auto-grow recompute in that case, similar to how some editors distinguish user-driven resize from content-driven auto-grow.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

}

.am-mm-variant-select {
max-width: 110px;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: text-overflow: ellipsis has no effect without overflow: hidden and white-space: nowrap

.am-mm-variant-select only sets max-width: 110px and text-overflow: ellipsis. Without overflow: hidden; white-space: nowrap;, the browser won't actually truncate long effort labels with an ellipsis — the <select> will just render at its natural width or wrap.

Suggested change
max-width: 110px;
.am-mm-variant-select {
max-width: 110px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}

Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-vscode/webview-ui/agent-manager/NewWorktreeDialog.tsx 353 adjustHeight() recomputes the container height from content on every keystroke/paste/undo, discarding any manual drag-resize the user made via the container's resize: vertical handle — contradicts the PR's own "manual resize keeps working" claim

SUGGESTION

File Line Issue
packages/kilo-vscode/webview-ui/agent-manager/agent-manager.css 3025 .am-mm-variant-select sets text-overflow: ellipsis without overflow: hidden/white-space: nowrap, so long effort labels won't actually truncate

The backend/model-allocation logic (multi-version.ts, multi-model-utils.ts) and their tests are solid — per-model effort correctly flows through allocations into initial messages with proper fallback, and the new unit tests exercise the real implementation without mocks.

Files Reviewed (29 files)
  • .changeset/compare-models-effort.md
  • .changeset/worktree-prompt-scroll.md
  • packages/kilo-vscode/src/agent-manager/multi-version.ts
  • packages/kilo-vscode/src/agent-manager/types.ts
  • packages/kilo-vscode/tests/unit/multi-model-utils.test.ts
  • packages/kilo-vscode/tests/unit/multi-version.test.ts
  • packages/kilo-vscode/webview-ui/agent-manager/MultiModelSelector.tsx - 0 issues
  • packages/kilo-vscode/webview-ui/agent-manager/NewWorktreeDialog.tsx - 1 issue
  • packages/kilo-vscode/webview-ui/agent-manager/agent-manager.css - 1 issue
  • packages/kilo-vscode/webview-ui/agent-manager/multi-model-utils.ts
  • packages/kilo-vscode/webview-ui/src/types/messages/agent-manager.ts
  • 18 i18n locale files (ar, br, bs, da, de, en, es, fr, it, ja, ko, nl, no, pl, ru, th, tr, uk, zh, zht) — mechanical key additions, no issues

Fix these issues in Kilo Cloud


Reviewed by claude-sonnet-5 · Input: 52 · Output: 18.5K · Cached: 1.9M

Review guidance: REVIEW.md from base branch main

t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
feat(agent-manager): effort selection in compare models, fix worktree prompt scrollbars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Double scroll in worktree creation prompt window

2 participants