feat(app): collapse large pasted input blocks#15411
Open
chindris-mihai-alexandru wants to merge 9 commits intoanomalyco:devfrom
Open
feat(app): collapse large pasted input blocks#15411chindris-mihai-alexandru wants to merge 9 commits intoanomalyco:devfrom
chindris-mihai-alexandru wants to merge 9 commits intoanomalyco:devfrom
Conversation
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
ad6edf3 to
8daea6c
Compare
e703655 to
93547d3
Compare
Author
|
Follow-up update pushed in this PR: paste-summary trigger threshold is now tuned for normal desktop workflows ( |
Author
|
Update: threshold tuning was reverted to upstream defaults to keep behavior aligned with existing OpenCode thresholds ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #15405
Type of change
What does this PR do?
This adds support for collapsed large paste blocks in the prompt input so users can keep the composer readable when pasting large chunks.
Implementation details:
pasteprompt part that keeps full pasted content plus a display summary (for example[Pasted ~N lines])pastepart for large pastes (same large-paste threshold logic already used in prompt attachments)pasteparts as non-editable inline pills in the input while preserving the full underlying content for submissionpackages/app/e2e/actions.ts), addressing the observedTimed out seeding question requestfailuresWhy this works:
content, so the model receives full pasted textsummary, so users can avoid large in-editor text noisedata-contentanddata-summary) so cursor behavior and state sync remain stableRelated context:
[Pasted ~1 lines]) #8501How did you verify your code works?
I validated logic changes locally by inspecting prompt state flow and parse/render behavior across the updated prompt input pipeline:
packages/app/src/components/prompt-input/attachments.tspackages/app/src/components/prompt-input.tsxpackages/app/src/context/prompt.tsxpackages/app/src/components/prompt-input/history.tspackages/app/e2e/actions.tsI also attempted local commands in this fork:
npm run -w @opencode-ai/app typecheckThat command currently fails in this environment due pre-existing workspace/module-resolution issues unrelated to this PR (missing modules and existing repo-wide TS issues), so I could not get a clean full typecheck signal here.
Manual QA checklist used for behavior validation:
[Pasted ~N lines]Screenshots / recordings
UI recording can be added after maintainers confirm preferred UX direction (collapsed default vs expanded default).
Checklist