Skip to content

feat(tui): add configurable paste summary thresholds#15771

Open
aspiers wants to merge 1 commit intoanomalyco:devfrom
aspiers:paste-summary-config
Open

feat(tui): add configurable paste summary thresholds#15771
aspiers wants to merge 1 commit intoanomalyco:devfrom
aspiers:paste-summary-config

Conversation

@aspiers
Copy link
Contributor

@aspiers aspiers commented Mar 2, 2026

Issue for this PR

Closes #15767

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Add paste_min_lines and paste_min_length to the experimental config section. These let users control when pasted content gets collapsed into [Pasted ~N lines] instead of being inserted inline.

The hardcoded thresholds (3 lines / 150 characters) are too aggressive for voice dictation users — dictated text routinely exceeds 150 characters in a single utterance, making it impossible to review and correct transcription errors. The only existing workaround (disable_paste_summary: true) removes paste summaries entirely, which is undesirable when pasting large content like stack traces.

Both settings are optional and default to the current values (3 and 150), so existing behaviour is unchanged.

How did you verify your code works?

Set both values in opencode.json and confirmed paste summary triggers at the configured thresholds rather than the defaults.

Screenshots / recordings

N/A — no UI changes, only threshold logic.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. contributor labels Mar 2, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found one potentially related PR:

Related PR:

Why it's related: This PR likely implemented the paste summary/collapse feature that the current PR (15771) is now making configurable. The current PR adds configurable thresholds (paste_min_lines and paste_min_length) to allow users to control when pasted content gets summarized, which directly builds upon the functionality introduced in #15411.

@github-actions github-actions bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Mar 2, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@aspiers aspiers changed the title feat(config): add configurable paste summary thresholds feat(tui): add configurable paste summary thresholds Mar 3, 2026
Add paste_min_lines (default: 3) and paste_min_length (default: 150)
to experimental config, allowing users to tune when pasted content
gets summarised rather than inserted inline.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Make paste summary thresholds configurable

1 participant