Skip to content

fix(jetbrains): match VS Code paste collapse thresholds - #14205

Merged
marius-kilocode merged 1 commit into
mainfrom
increase-vscode-paste-summary-limit
Sep 16, 2026
Merged

marius-kilocode merged 1 commit into
mainfrom
increase-vscode-paste-summary-limit

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

What Problem This Solves

The JetBrains paste summary still used the CLI thresholds from #13889: a pasted block collapsed at five lines or 800 characters. The VS Code composer was raised to 15 lines or 4000 characters in #14170, so the two IDE clients collapsed the same paste at different sizes.

Why This Change Was Made

The IDE composer has more room than the terminal. At five lines or 800 characters, ordinary snippets collapsed before they filled the visible input. The JetBrains thresholds now match isCollapsiblePaste in the VS Code webview so both IDE clients behave the same. The CLI keeps its existing limits, since its space is genuinely constrained.

User Impact

Pasting into the JetBrains prompt collapses a block into [Pasted ~N lines] only at 15 lines or 4000 characters. Short and medium pastes are inserted as-is, and the transcript fold follows the same rule.

Evidence

  • ./gradlew :frontend:test from packages/kilo-jetbrains/ passes (full frontend suite, including PromptPasteCollapseTest, PromptPanelTest, and TextViewTest).
  • Threshold unit tests cover the 14/15 line and 4000/4001 character boundaries.
  • The change is a threshold constant plus test fixtures; the fold, expand, and transcript paths are unchanged.

Raise the JetBrains paste collapse thresholds to 15 lines or 4000
characters, matching isCollapsiblePaste in the VS Code webview. The IDE
composer has more room than the CLI, whose five lines or 800 characters
folded ordinary snippets too early. The CLI is unchanged.
@kilo-code-bot

kilo-code-bot Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The threshold constants in PromptPasteCollapse.kt now match isCollapsiblePaste in the VS Code webview exactly (lines >= 15 || length > 4000), the transcript fold in PromptView.kt reuses the same collapsible predicate, and the composer/transcript tests were updated consistently at the 14/15-line and 4000/4001-character boundaries. The CLI keeps its own 5/800 limits, and the added changeset is accurate and user-facing.

Files Reviewed (4 files)
  • .changeset/jetbrains-paste-collapse-thresholds.md
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/prompt/PromptPasteCollapse.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/PromptPanelTest.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/prompt/PromptPasteCollapseTest.kt

Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

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.

2 participants