Skip to content
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

Enable manually editing search context #5965

Merged
merged 17 commits into from
Oct 23, 2024
Merged

Conversation

beyang
Copy link
Member

@beyang beyang commented Oct 22, 2024

Adds a button to ContextCell that copies the fetched context items to the previous input as context chips.

manual-context.mov

Outstanding todos:

  • Change text from "manually edit context" to "edit context"
  • Make work when search intent is detected. Text should be "move results to input"
  • Expand search results by default

Test plan

  • Use an @repo chip
  • Click the "Edit context manually" button
  • Verify context items are added to the input

@beyang beyang force-pushed the bl/manual-context-search-v4 branch from 0e2909b to 1288f43 Compare October 22, 2024 05:32
@beyang beyang marked this pull request as ready for review October 22, 2024 05:48
@beyang beyang requested a review from sqs October 22, 2024 07:03
if (!contextFiles || !editor) {
return
}
editor.removeMentions(item => item.type !== 'repository')
Copy link
Member

Choose a reason for hiding this comment

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

why are we removing the non-repo mentions ?

Copy link
Member Author

Choose a reason for hiding this comment

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

renamed removeMentions to filterMentions

@beyang beyang force-pushed the bl/manual-context-search-v4 branch from 0462f09 to 9c991e0 Compare October 23, 2024 00:27
@beyang beyang enabled auto-merge (squash) October 23, 2024 10:36
@beyang beyang merged commit 662423a into main Oct 23, 2024
22 checks passed
@beyang beyang deleted the bl/manual-context-search-v4 branch October 23, 2024 10:39
@PriNova
Copy link
Collaborator

PriNova commented Oct 23, 2024

After step 3 in the test plan, if asking Cody new with the edited context files, the fetching as context fails and Cody responses with a wild guess.

The issue is, that Cody tries to fetch from sourcegraph.com and fails
Screenshot 2024-10-23 121429
Screenshot 2024-10-23 121505

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants