Skip to content

fix: prevent non whitespace characters from being sent from input#10149

Merged
RomneyDa merged 2 commits intocontinuedev:mainfrom
uinstinct:non-whitespace
Feb 4, 2026
Merged

fix: prevent non whitespace characters from being sent from input#10149
RomneyDa merged 2 commits intocontinuedev:mainfrom
uinstinct:non-whitespace

Conversation

@uinstinct
Copy link
Contributor

@uinstinct uinstinct commented Feb 3, 2026

Description

Prevent non-whitespace characters from being sent in the input.

closes #6285
closes #9605

resolves CON-5313


Tool calls are already prevented from being empty in this line:

if (!allowEmpty && !value.trim()) {
throw new Error(`Argument ${argName} must not be empty or whitespace-only`);
}
which was the possible source of error in #6285

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-review

Checklist

  • [] I've read the contributing guide
  • [] The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

Screen recording or screenshot

before.mp4
after.mp4

Tests

[ What tests were added or updated to ensure the changes work as expected? ]


Continue Tasks: ▶️ 2 queued — View all


Summary by cubic

Block sending whitespace-only input from the TipTap editor. Valid messages now require non-whitespace text, a mention, or a Prompt/Code block (addresses Linear CON-5313; fixes edge cases from #6285 and #9605).

  • Bug Fixes
    • Update hasValidEditorContent to ignore whitespace-only text via trim() and treat mention nodes as valid.
    • Preserve PromptBlock and CodeBlock as valid content.

Written for commit 2a717dd. Summary will update on new commits.

@uinstinct uinstinct requested a review from a team as a code owner February 3, 2026 12:53
@uinstinct uinstinct requested review from sestinj and removed request for a team February 3, 2026 12:53
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Feb 3, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

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

Nice fix!

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Feb 4, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 4, 2026
@RomneyDa RomneyDa merged commit 2a33ddc into continuedev:main Feb 4, 2026
52 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Feb 4, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Feb 4, 2026
@uinstinct uinstinct deleted the non-whitespace branch February 4, 2026 07:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Error: Claude 3.7 Sonnet - 400 "text content blocks must contain non-whitespace text"

2 participants