Skip to content

improve: instruct model when no context results were retrieved #6303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

uinstinct
Copy link
Contributor

@uinstinct uinstinct commented Jun 26, 2025

Description

When no results were retrieved during context embeddings, instruct model to use other tools.

Resolves CON-2400

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

Screenshots

before.mp4
after.mp4

Tests

Replication

  1. Launch the extension
  2. Add a new .continueignore in the manual testing sandbox which excludes all the files
.continueignore ``` .continueignore AdvancedPage.tsx calculator_test Calculator.java config.yaml data.json Dockerfile example.ipynb nested-folder program.cs query.sql readme.md requirements.txt test.css test.csv test.html test.js test.kt test.php test.py test.rb test.rs test.sh test.ts ```
  1. reindex the codebase
  2. prompt the model using @codebase

@uinstinct uinstinct requested a review from a team as a code owner June 26, 2025 05:05
@uinstinct uinstinct requested review from Patrick-Erichsen and removed request for a team June 26, 2025 05:05
Copy link

netlify bot commented Jun 26, 2025

👷 Deploy request for continuedev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 02689a7

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jun 26, 2025
Copy link

recurseml bot commented Jun 26, 2025

😱 Found 1 issue. Time to roll up your sleeves! 😱

Need help? Join our Discord for support!
https://discord.gg/NCpkJ4kF

}
return [];
return [
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't send this message when the user in in chat mode, because the model won't have access to any tools.

I realize we might not have a way of knowing this in core yet, so potentially not a trivial change. But seems important

Copy link
Contributor Author

Choose a reason for hiding this comment

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

core is stateless right?
if so, we might need to pass a parameter when getting context items or add a protocol in IDE

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah that's correct. I feel like passing it as a parameter would be the easier option

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Jun 27, 2025
@sestinj sestinj removed the request for review from Patrick-Erichsen June 27, 2025 04:02
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Jul 1, 2025
@uinstinct uinstinct requested a review from sestinj July 1, 2025 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants