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

refactor(chat): Remove parenthesis wrapping of other files when calling selectedCodePromptWithExtraFiles #7022

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

Conversation

ichim-david
Copy link
Collaborator

@ichim-david ichim-david commented Feb 8, 2025

refactor(chat): Remove file mention duplication for default commands.
Based on the comments:
#6910 (review)
#6910 (comment)

I'm opening this pull request in order to get rid of the extra setup parentheses between the primary mention and the other mentions.
For extra context on reason see this comment #6910 (comment)

I am also removing the duplication of context mention from the default commands because these commands have been duplicated as default prompts and they do not duplicate the context mention leaving just the context mention with the file range.

Test plan

  1. Run default commands such as explain code and notice the lack of context mention duplication
  2. Run a prompt that uses a cody-context such as cody://current-tabs and notice that the tabs following the first tab are no longer wrapped with parenthesis

This aligns the output of these commands with the output we get from the default prompts.
…ng `selectedCodePromptWithExtraFiles`

- The addition of parenthesis was confusing because this was called in prompt hydration such as cody://current-tabs
  and the tab replacement showed the tabs as such @tab1 (@tab2 @Tab3) instead of simply @tab1 @tab2 @Tab3
@ichim-david
Copy link
Collaborator Author

@vovakulikov I'm going to need some help with the tests that fail because the polly recordings will need to be updated.
Can you please handle this as part of the code review?

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.

1 participant