Skip to content

Conversation

@uinstinct
Copy link
Contributor

@uinstinct uinstinct commented Oct 10, 2025

Description

Fix the active file sending logic when clicking on the send button.

closes #7941
resolves CON-4195

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? ]


Summary by cubic

Fixes the send button so clicking it no longer unintentionally includes the active file. Behavior now respects the active file toggle and modifier keys, aligning with CON-4195.

  • Bug Fixes
    • Corrected noContext calculation in InputToolbar to handle click + Meta/Alt states and prevent accidental active file context.

@uinstinct uinstinct requested a review from a team as a code owner October 10, 2025 05:09
@uinstinct uinstinct requested review from RomneyDa and removed request for a team October 10, 2025 05:09
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Oct 10, 2025
@uinstinct
Copy link
Contributor Author

I think we can remove the usage of useActiveFile since it comes from config.json (which is now deprecated).

Going further, we can also remove InputModifiers since now both useCodebase and useActiveFile are deprecated.

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.

1 issue found across 1 file

Prompt for AI agents (all 1 issues)

Understand the root cause of the following 1 issues and fix them.


<file name="gui/src/components/mainInput/InputToolbar.tsx">

<violation number="1" location="gui/src/components/mainInput/InputToolbar.tsx:226">
When the active-file toggle is off, this should invert both Meta and Alt modifiers; with the new `!meta || alt`, holding Alt always keeps `noContext` true, so you can no longer include the active file with Alt. Please negate the combined condition instead.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@RomneyDa
Copy link
Collaborator

@uinstinct nice find! Pulled and compared vs main, works

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Oct 11, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 11, 2025
@RomneyDa RomneyDa changed the title fix: prevent active file sending on click fix: HOTFIX prevent active file sending on click Oct 11, 2025
@RomneyDa RomneyDa merged commit da5cf39 into continuedev:main Oct 11, 2025
52 of 54 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Oct 11, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 11, 2025
@sestinj
Copy link
Contributor

sestinj commented Oct 12, 2025

🎉 This PR is included in version 1.24.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 14, 2025

🎉 This PR is included in version 1.28.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@uinstinct uinstinct deleted the active-file-click-send branch October 14, 2025 06:17
@sestinj
Copy link
Contributor

sestinj commented Oct 15, 2025

🎉 This PR is included in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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 released size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Entire files are being added to context without consent - (this drastically increases token consumption and is a privacy issue)

3 participants